Serhiy Storchaka added the comment: 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. ---------- priority: normal -> low _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com