STINNER Victor added the comment:

> Do you have any numbers on how common constant comparisons are in real code?

In my experience, it almost never occur in real application. But it's common 
when you start with a constant propogation optimization:

* https://faster-cpython.readthedocs.org/optimizations.html#constant-propagation
* 
https://fatoptimizer.readthedocs.org/en/latest/optimizations.html#constant-propagation

If you extend constant propagation to things like os.name, it's even more 
common, but it requires to specialize the code, to disable optimization if 
os.name is modified (that's one feature provided by FAT Python).

----------

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

Reply via email to