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 serhiy.storchaka
Recipients methane, rhettinger, serhiy.storchaka, vstinner
Date 2017-01-24.09:17:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485249432.78.0.237260073834.issue29336@psf.upfronthosting.co.za>
In-reply-to
Content
merge-constants.patch is rather a proof of concept. I think it may be more efficient after removing unneeded folded constants (issue28813). But this can be done better with the AST optimizer (issue1346238, issue11549). It would be worth also to merge nested constants. This is similar to interning string constants (see in Objects/codeobject.c).

The benefit is small and we should check that merging constants doesn't have too large cost (CPU time or temporally consumed memory) at compile time.

I think we should first implement the AST optimizer, and then try to combine merging constants with interning string constants.
History
Date User Action Args
2017-01-24 09:17:12serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, methane
2017-01-24 09:17:12serhiy.storchakasetmessageid: <1485249432.78.0.237260073834.issue29336@psf.upfronthosting.co.za>
2017-01-24 09:17:12serhiy.storchakalinkissue29336 messages
2017-01-24 09:17:12serhiy.storchakacreate