This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients barry, benjamin.peterson, methane, ned.deily, ronaldoussoren, tdsmith, zmwangx
Date 2018-02-09.03:54:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518148465.77.0.467229070634.issue32616@psf.upfronthosting.co.za>
In-reply-to
Content
I don't know exactly.  But as far as I saw, Python 3's eval loop has less function-wide local variables.

For example, ROT_THREE uses only block local variable.
https://github.com/python/cpython/blob/a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6/Python/ceval.c#L1109-L1111

On the other hand, there are more function-wide local variables in Python 2.  And some of them are used over `case`s actually.
https://github.com/python/cpython/blob/672fd7d8162f76aff8423fa5c7bfd2b1e91faf57/Python/ceval.c#L802-L807


I suspect that's why LLVM4 failed to optimize Python 2 but success to optimize Python 3.
History
Date User Action Args
2018-02-09 03:54:25methanesetrecipients: + methane, barry, ronaldoussoren, benjamin.peterson, ned.deily, tdsmith, zmwangx
2018-02-09 03:54:25methanesetmessageid: <1518148465.77.0.467229070634.issue32616@psf.upfronthosting.co.za>
2018-02-09 03:54:25methanelinkissue32616 messages
2018-02-09 03:54:25methanecreate