[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

Serhiy Storchaka report at bugs.python.org
Sun Feb 21 05:03:35 EST 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

PyLong_Check is two memory reads, bits operation, and comparison with 0. And one non-inlined function call when limited API is used. PyLong_CheckExact is only one memory read and comparison.

I am not sure that the difference is significant enough to justify the optimization. I would require evidences that this optimization is significant if it would be proposed now. But the code is already written in such form, and I am not sure that it is worth to spend our time to change it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43267>
_______________________________________


More information about the Python-bugs-list mailing list