"Newbie" questions - "unique" sorting ?
kp at kyborg.dk
Thu Jun 26 14:21:16 CEST 2003
> i just did a test comparing:
> if key not in mydict:
> if not mydict.has_key(key):
> and the 1st way cameout 28% faster. (on python 2.3)
Must be functioncall overhead then... lack of optimization in compiler?
since the two lines are functionally completely equivalent.
Unfortunate for me, fortunate for those who don't have to write code for
older python implementations ;-/
Med Venlig Hilsen / Regards
Kim Petersen - Kyborg A/S (Udvikling)
IT - Innovationshuset
Tlf. +4576408183 || Fax. +4576408188
More information about the Python-list