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/2003-March/034015.html below:

[Python-Dev] are NULL checks in Objects/abstract.c really needed?

[Python-Dev] are NULL checks in Objects/abstract.c really needed? [Python-Dev] are NULL checks in Objects/abstract.c really needed?Guido van Rossum guido@python.org
Thu, 13 Mar 2003 09:29:38 -0500
>  i had a quick look at Objects/abstract.c in 2.2.2's source. almost
>  every function there checks whether the objects it's passed are not
>  NULL. if they are, SystemError exception occurs. since i've never come
>  across such exception i've commented out those checks.
> 
>  the resulting python binary did 6.5% more pystones on average (the
>  numbers are below). my question is: are those checks really necessary
>  in non-debug python build?

Unfortunately, this is part of the safety net for poor extension
writers, and I'm not sure we can drop it.

Given that Pystone is so regular, it's probably just one or two of the
functions you changed that make the difference.  If you can figure out
which ones, perhaps you could inline just those (in the switch in
ceval.c) and get the same effect.

Anyway, I only get a 1% speedup.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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