Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

> PyToken_OneChar in Parser/token.c is autogenerated.  I suspect it may be 
> faster and smaller if it were a lookup into a static table of ops rather than 
> a switch statement.  Check to see if it is.

I suspect that it will be marginally faster (because it won't need to do bound 
checks to go to the default case) but under PGO it will make almost no 
difference.

You can try to see if there is any significant improvement using the 
pyperformance suite (https://pyperformance.readthedocs.io/) with and without 
your change (with PGO/LTO activated).

----------
nosy: +pablogsal

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to