3 ms·
Thanks for sharing your project! How does performance change when the `unsafe` feature is disabled? It looks like there is only one usage of `unsafe` outside
by mleonhard 3y ago
Thanks for sharing your project! How does performance change when the `unsafe` feature is disabled?
It looks like there is only one usage of `unsafe` outside of the no_std build: https://github.com/explodingcamera/tinywasm/blob/c50bae752f3e788faf66b376d065374cc4085931/crates/tinywasm/src/store/memory.rs#L192 https://github.com/explodingcamera/tinywasm/blob/c50bae752f3...
- explodingcamera 3y agoYeah, the only unsafe code right now is using this trait to prevent some duplicate bounds checking when reading/writing to memories that wasn't being optimized by the rust compiler. Shouldn't be too much of a performance difference for code that's not too heavy on memory access, made about a 5-10% difference for the selfhosted benchmark if I remember correctly though.
- deleted 3y ago[deleted]