]> granicus.if.org Git - python/commit
Move the bytecode optimizer upstream so that its results are saved in pyc
authorRaymond Hettinger <python@rcn.com>
Wed, 18 Aug 2004 05:22:06 +0000 (05:22 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 18 Aug 2004 05:22:06 +0000 (05:22 +0000)
commit1a7892924fb23f657b63ea085899342f16fad389
tree4bfa82fb4191ca6371e7d5f3878ea8abec3dc1da
parent9bb1f0592cf71cb639669001c6d7119d7966510d
Move the bytecode optimizer upstream so that its results are saved in pyc
files and not re-optimized upon import.  Saves a bit of startup time while
still remaining decoupled from the rest of the compiler.

As a side benefit, handcoded bytecode is not run through the optimizer
when new code objects are created.  Hopefully, a handcoder has already
created exactly what they want to have run.

(Idea suggested by Armin Rigo and Michael Hudson.  Initially avoided
 because of worries about compiler coupling; however, only the nexus
 point needed to be moved so there won't be a conflict when the AST
 branch is loaded.)
Python/compile.c