Big O of sets

T

Tony Meyer

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
 
J

Josiah Carlson

Tony said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,839
Latest member
MartinaBur

Latest Threads

Top