[CentralOH] Syntactic Sugar (or sacharine)?
Eric Floehr
eric at intellovations.com
Fri Aug 12 19:39:24 CEST 2011
Here is something else to ponder...
>>> timeit.Timer("min.__hash__()").timeit(100000000)
10.986408948898315
>>> timeit.Timer("'min'.__hash__()").timeit(100000000)
9.713651180267334
>>> timeit.Timer("hash(min)").timeit(100000000)
8.8025760650634766
>>> timeit.Timer("hash('min')").timeit(100000000)
5.7652111053466797
Not sure at all what that means :-). BTW, all these tests are on
Python 2.6.5 on Ubuntu 10.04.
-Eric
More information about the CentralOH
mailing list