[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

Nadeem Vawda report at bugs.python.org
Mon Oct 1 00:17:20 CEST 2012


Nadeem Vawda added the comment:

> Recursive inline _check_can_read() will be enough. Now this check calls 4 Python functions (_check_can_read(), readable(), _check_non_closed(), closed). Recursive inlining only readable() in _check_can_read() is achieved significant but less (about 30%) effect.

I've inlined readable() into _check_can_read() [3.3: 4258248a44c7 | default: abb5c5bde872]. This seems like a good balance between maximizing our performance in edge cases and not turning the code into a mess in the process ;)

Once again, thanks for your contributions!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16034>
_______________________________________


More information about the Python-bugs-list mailing list