DEV Community

Discussion on: Optimising a JavaScript library with WebAssembly, a failed attempt!

Collapse
 
halimsamy profile image
Halim Samy • Edited

I completely agree with @asafigan , But I'm wondering if you have compiled the Rust/WSAM with Release flag and optimizations turned on.

Collapse
 
antoniovdlc profile image
Antonio Villagra De La Cruz

Good point!

I did try to compile the Rust code adding the following lines to Cargo.toml:

[profile.release]
lto = true
Enter fullscreen mode Exit fullscreen mode

Unfortunately that didn't improve the performance much.

It is very possible that this setting alone didn't do what I was thinking it was doing.