471,351 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,351 software developers and data experts.

Big O of sets

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
1 2353
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.

Similar topics

21 posts views Thread by Raymond Hettinger | last post: by
5 posts views Thread by Raymond Hettinger | last post: by
7 posts views Thread by Steve | last post: by
1 post views Thread by JosAH | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.