0.3.0 – Optimizations
This release optimizes the Mica interpreter a ton, and adds the ability to call Mica functions and methods from Rust.
- #20 Sinking assignments
- Assignments that don't result in a value now generate more efficient bytecode than previously.
- Basically, there's now a bunch of instructions for directly popping a value off the stack into a variable without making a copy.
- #21 NaN boxing
- Values inside the VM now take up 8 bytes instead of 24 bytes, which should improve cache efficiency.
- #24 Garbage collection
- This is the big star of the show, and improves performance drastically by reducing branch mispredictions caused by
Drop
ping andClone
ing values. - Thanks to the GC values are now trivially dropped and copied.
mica-hl
has received an overhaul of the value API because of this and NaN boxing, because the implementation of values is now hidden and our ownGc<T>
instead of Rust'sRc<T>
is used.- There's now a
Gc
type in Mica's standard library, for controlling the GC's operation.
- This is the big star of the show, and improves performance drastically by reducing branch mispredictions caused by
- #37 Calling Mica from Rust
Engine
now exposes a bunch of functions that let you call any value the()
call operator can be used on (right now only functions), as well as methods.
- Various smaller fixes and optimizations. In particular, a huge performance regression introduced in 0.2.0 as a result of my desperate attempts to implement reentrancy, has now been fixed.