PyneCore's code transformation now runs in Rust
Before your Pyne code runs, PyneCore rewrites it: it turns series, persistent variables and per-call-site state into ordinary Python. That rewrite is now done by compiled Rust code shipped with the package, and it is about 2.4 times faster. Across 1065 real-world scripts, the full transformation dropped from 98 seconds to 40.5. You feel it on the first run of a script and on every run after an edit.
The Python implementation remains the reference. Each Rust step was ported from its Python counterpart and must produce exactly the same result, and every published package is tested for that on every platform before it ships. If a platform has no compiled package, PyneCore falls back to Python and gives the same results.
This release also tracks a quiet change on TradingView’s side. Sometime in the past three months, TradingView changed how ta.sma and math.sum add up their window, and its numbers shifted in the last digits. PyneCore now uses the same method, verified bit for bit on almost 400,000 TradingView bars, so indicators built on them match TradingView again.
The measurements, and a script you can run to see the change yourself, are in our blog post: https://pynesys.io/blog/tradingview-replaced-the-arithmetic-behind-math-sum-and-ta-sma/