Repository navigation
Whats Changed
Faster JIT instantiation
This release is primarily about making the new experimental jit compiler faster, the speedups came from two places:
- A big round of work on the compiler itself. Both the frontend and the DEX backend now do a lot less work per module, mostly the result of profiling the larger corpus fixtures and chipping away at whatever showed up hot.
instancenow uses multiple cores. Compiling and lowering to DEX is shared across up to six cores, so larger modules benefit the most.
Both module and instance in chasm-jit are now suspending functions. If you're validating, pass validate = true to module and it will decode and validate in a single pass across the available cores:
val module = module(bytes, validate = true)
val instance = instance(store, module, imports)These numbers are totals across Chasms test corpus, measured on a Galaxy S24 FE. Results will vary from device to device.
| Phase | 2.4.0 | 2.5.0 | Difference |
|---|---|---|---|
| Decode and validate | 722 ms | 440 ms | 1.6x faster (−39%) |
| Instance | 9.05 s | 3.08 s | 2.9x faster (−66%) |
| Total | 9.77 s | 3.52 s | 2.8x faster (−64%) |
A reminder this api is experimental, nothing is close to being final.