By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

Big O of sets

P: n/a
Alex Martelli's excellent Nutshell book has a handy little section outlining
the Big O notation of various common Python operations (x in dict and
list.append(x), for example). Can anyone point me to equivalents for the
Python 2.3 sets.[Immutable]Set operations?

I know that I could figure these myself from either timing or reading the
code, but it'd be nice if someone's already done this :) Either googling
can't find it, or (more likely), I'm not thinking of the right search terms.

In particular, I'm interested in intersection, union and > (proper subset),
and of ImmutableSets, rather than Sets.

Thanks!

=Tony Meyer
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Tony Meyer wrote:
Alex Martelli's excellent Nutshell book has a handy little section outlining
the Big O notation of various common Python operations (x in dict and
list.append(x), for example). Can anyone point me to equivalents for the
Python 2.3 sets.[Immutable]Set operations?

I know that I could figure these myself from either timing or reading the
code, but it'd be nice if someone's already done this :) Either googling
can't find it, or (more likely), I'm not thinking of the right search terms.

In particular, I'm interested in intersection, union and > (proper subset),
and of ImmutableSets, rather than Sets.

Thanks!

=Tony Meyer


Tony,

Read the source.

- Josiah
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.