Author dalke
Recipients Jim Fasarakis-Hilliard, dalke, pitrou, serhiy.storchaka
Date 2017-05-22.02:42:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495420965.96.0.877430505.issue30416@psf.upfronthosting.co.za>
In-reply-to
Content
A complex solution is to stop constant folding when there are more than a few levels of tuples. I suspect there aren't that many cases where there are more than 5 levels of tuples and where constant creation can't simply be assigned and used as a module variable.

This solution would become even more complex should constant propagation be supported.

Another option is to check the value about to be added to co_consts. If it is a container, then check if it would require more than a few levels of hash calls. If so, then simply add it without ensuring uniqueness.

This could be implemented because the compiler could be told how to carry out that check for the handful of supported container types.
History
Date User Action Args
2017-05-22 02:42:46dalkesetrecipients: + dalke, pitrou, serhiy.storchaka, Jim Fasarakis-Hilliard
2017-05-22 02:42:45dalkesetmessageid: <1495420965.96.0.877430505.issue30416@psf.upfronthosting.co.za>
2017-05-22 02:42:45dalkelinkissue30416 messages
2017-05-22 02:42:45dalkecreate