3 ms·
a "add one to a number and return it" compiled this way results in a ~100 byte binary. It's about twice the size of writing it by hand, but those gains get lost
by steveklabnik 9y ago
a "add one to a number and return it" compiled this way results in a ~100 byte binary. It's about twice the size of writing it by hand, but those gains get lost as soon as you start doing real things, so it's not a big deal.
One big jump in binary size starts when you use the allocator, as then it needs to include the allocator's code.
- haberman 9y agoIt would be nice if there was a modern malloc implementation (with good multi-threaded performance) that optimized for size.
- steveklabnik 9y agoWe use a Rust port of dlmalloc with this toolchain. Multithreading doesn't matter to wasm yet, incidentally; it's still single threaded.
- wofo 9y agoNote that I am using the allocator in Rocket, so I would estimate the size to be something around 40kB