STINNER Victor added the comment: INADA Naoki added the comment: > My motivation is improve speed,
Ah, if the motivation is performance, I would like to see benchmark results :-) I understand that an AST optimizer would help to produce more efficient bytecode, right? > reduce memory usage, I noticed an issue with the peephole optimizer: the constant folding step keeps original constants. Moving constant folding to the AST stage fixes this issue by design. > and quicker startup time for real world applications. You mean faster import time on precompiled .pyc files, right? It's related to the hypothetical faster bytecode. > If some optimization in FAT optimizer has significant speedup, I want to try > it. See http://fatoptimizer.readthedocs.io/en/latest/microbenchmarks.html#microbench FYI it took me something like 2 months to build FAT Python "infrastructure": fix CPython bugs, design guards, design the AST optimizer, write unit tests, etc. I didn't spend much time on efficient optimizations. But for my first rule was to not break the CPython test suite! Not break the Python semantics, otherwise it would be impossible to put enable the optimizer by default in CPython, which is my long term goal. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11549> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com