When Python outruns C++ ...

Andrew Dalke adalke at mindspring.com
Wed Apr 2 05:34:44 CEST 2003

Greg Ewing:
> This kind of thing has been observed before -- I believe
> someone noticed that using get() on a dict was slower than
> indexing and catching the exception.

Barry Warsaw, IPC...6?  The one in San Jose, I think.

Yep, here it is.

It shows that try/except is faster than setdefault when
the number of exceptions is low.

                    dalke at dalkescientific.com

More information about the Python-list mailing list