how fast is Python code - another detail

Gregor Lingl glingl at aon.at
Thu Mar 4 20:27:31 CET 2004



Aloysio Figueiredo schrieb:

>>         if sig not in d.keys():
>>
>>    
>>
>
>Have you tried 
>
>  if sig not in d.iterkeys():
>
>?
>
Yes. It's only slightly faster that if sig not in d.keys(),
i. e. still much slower than if sig in d by a factor of 180
for a 20000-item list.

Gregor


>Aloysio
>  
>




More information about the Python-list mailing list