PyneCore v6.10.9: scripts start more than twice as fast after an edit

Before a script runs, PyneCore rewrites its Python so it behaves like Pine: variables that keep their value between bars, series history, and separate state for every ta.* call. In v6.10.9 this rewrite is about 2.2 times faster. On 119 scripts from Pyne in the Wild, a typical script now takes 33 ms instead of 70 ms. You notice it on the first run, and every time you change a script and run it again.

The generated code is unchanged. On 1,677 input files the new version produces the same output as the old one, byte for byte. The cache is also stricter: when you change one of your libraries, every script that uses it gets rewritten. PyneCore no longer writes .pynetypes.json files next to your scripts.

How the rewrite works and how it got faster, explained for anyone who knows a bit of Python: https://pynesys.io/blog/what-pynecore-does-to-your-python/