Pi-Bolt 0.4.0 inlines method calls in hot loops and speeds up objects used as dictionaries. Startup is 15% faster than 0.3.1. It runs Pi 1.0.0.
Faster
- Methods in hot loops. A call like
helpers.isSpace(c)orthis.tokenChar(i)inside a loop is now compiled into the loop when the program defines exactly one method of that name, behind a check that the object's method is that function. If it is another function, the loop's generic copy makes the ordinary call. The method helper in the plugin guide's table went from 243 ms to 58 ms (a module-level function: 39 ms; stock Bun's JIT: 24 ms). Names of standard methods (indexOf,call,then...) and names that several classes define are left alone. - Objects used as dictionaries.
counts[key] = (counts[key] || 0) + 1with string or symbol keys now stores through the engine's property cache instead of a C++ call per write: 1.8x faster in a loop. - Measured on Pi: starting is 15% faster than 0.3.1 (45 vs 53 ms to
--version), a headless prompt 7–9% faster, and an interactive session uses 3% less CPU. Memory is unchanged.
Fixed
- The benchmark harness now warms every build's executable in the page cache equally before measuring. A freshly built executable used to show up to 10% more resident memory than the same executable read from disk, for no real difference.
Install
curl -fsSL https://pi-bolt.opensec.in/install.sh | shor pi-bolt update from 0.3.1, or npm install -g pi-bolt, or bun add -g pi-bolt.
| Asset | For |
|---|---|
pi-bolt-linux-x64.tar.xz / .tar.gz
| Recommended. CPUs with AVX2 (Intel Haswell 2013+, AMD Zen+). |
pi-bolt-linux-x64-baseline.tar.xz / .tar.gz
| Any x86-64 CPU. |
pi-bolt-linux-x64-jit.tar.xz / .tar.gz
| JIT also on, for plugins loaded at run time. |
pi-bolt-runtime-linux-x64.tar.gz
| The Pi-Bolt Bun runtime, for compiling plugins in. |
Linux x86-64 with glibc 2.17 or later.