[issue5176] Special-case string formatting in BINARY_MODULO implementation

Jeffrey Yasskin report at bugs.python.org
Sat Feb 7 02:53:11 CET 2009


Jeffrey Yasskin <jyasskin at gmail.com> added the comment:

I think this is only valid when PyString_CheckExact is true. A subclass
could override __mod__, right?

I'm somewhat interested to see how a primarily-numeric benchmark
responds to this patch. I'd expect it to get very slightly slower for %
operations. Probably, given that there's an indirect call in the way,
the extra test would hide in the noise, but it's worth checking. What's
a good numeric benchmark suite? `time ./python Lib/test/test_decimal.py`?

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


More information about the Python-bugs-list mailing list