A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065149.html below:

[Python-Dev] 2.5a2 try/except slow-down: Convert to type?

[Python-Dev] 2.5a2 try/except slow-down: Convert to type? [Python-Dev] 2.5a2 try/except slow-down: Convert to type?Fredrik Lundh fredrik at pythonware.com
Wed May 24 13:23:09 CEST 2006
Michael Hudson wrote:

> Could it just be that instantiating instances of new-style classes is
> slower than instantiating instances of old-style classes?  There's not
> anything in what you've posted to suggest that exceptions are involved
> directly.

python -mtimeit -s "class Exception(object): pass" "Exception()"
1000000 loops, best of 3: 0.284 usec per loop

python -mtimeit -s "class Exception: pass" "Exception()"
1000000 loops, best of 3: 0.388 usec per loop

python -mtimeit "Exception()"
1000000 loops, best of 3: 1.95 usec per loop

</F>

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4