Breaking the WASM/JS communication performance barrier

https://news.ycombinator.com/rss Hits: 15
Summary

In sledgehammer every operation is encoded as a sequence of bytes packed into an array. Every operation takes 1 byte plus whatever data is required for it. Each operation is encoded in a batch of four as a u32. Getting a number from an array buffer has a high constant cost, but getting a u32 instead of a u8 is not more expensive. Sledgehammer bindgen reads the u32 and then splits it into the 4 individual bytes. It will shuffle and pack the bytes into as few buckets as possible and try to inline reads into js.

First seen: 2025-07-26 12:12

Last seen: 2025-07-27 03:19