v0.5.0
v0.5.0 is a significant release which implements precise GC for small object types. Precise GC, as opposed to conservative GC, takes into account type information and can ignore memory that cannot be a pointer, even if the memory "looks like a pointer". Because purely conservative GCs must look at every value in memory for whether they look like a pointer, they can have false positives. In many normal applications using conservative GCs, this is not an issue because 64-bit memory space makes the likelihood of random data matching a memory address to be very low, but WebAssembly is limited to 32-bit memory space, and the likelihood is relatively high. We noticed real applications having memory issues when embedding large files of random-like data (or even just a geo-IP database).
Now, for small objects (up to ~96 bytes), the GC will precisely mark them, only looking at locations that are known to be pointers. This is the object type itself, meaning arrays of objects are also handled precisely. Notably, byte arrays, which have no pointers by their nature, are now handled precisely and will not cause false positives - this should notably impact the case of embedding files. In practice, for the simplistic string allocation benchmark we run in CI, while difficult to compare across different machine types, we are seeing about 3x speedup reflecting that much less memory has to be visited by the GC as it recognizes the strings as pointerless. This means the benchmark probably needs to be updated in the future with more real-world allocation patterns but general application performance should improve somewhat with this change.
Full Changelog: v0.4.0...v0.5.0