Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Licheng Fang > wrote: > > > Hi, I'm learning STL and I wrote some simple code to compare the > > efficiency of python and STL. > > [...] > > There's a difference in data structures at least. The Python `set` type > is implemented with a hash algorithm, so the equivalent STL type would be > `hash_set`. `set` in Python does not store its contents sorted. >
The set should be only 4 items in size, according to my reading of the code, so set implementation differences shouldn't lead to drastic performance differences. > Ciao, > Marc 'BlackJack' Rintsch Cheers, --Tim -- http://mail.python.org/mailman/listinfo/python-list