[issue39150] See if PyToken_OneChar would be faster as a lookup table

Pablo Galindo Salgado report at bugs.python.org
Thu Jan 9 05:31:22 EST 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I will take a look and try to reproduce the benchmarks result you mentioned, but if under PGO there is no substantial performance increase is much less appealing as the lookup table code is less clear and maintainable than the simple switch. Also you have a branch that is a good candidate to trigger the same branch mispredictions as the default of the switch (c1>=37 && c1<=126).

----------

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


More information about the Python-bugs-list mailing list