Hacker News new | ask | show | jobs
by F117-DK 2150 days ago
> We do not allow our customers to upload native-code binaries to run on our network. We only accept JavaScript and WebAssembly.

Since everything is compiled or transpiled to JS, does that make pure JS implementations the fastest (least overhead)?

Really looking forward to play around with the Unbound version!

1 comments

Wasm isn't compiled to JS, it's a separate engine within V8. Depending on the kind of code it can be faster than pure JS -- but it depends. JS code benefits from using V8's native garbage collector and other high-level built-ins that Wasm code currently cannot access so easily. So, perhaps counter-intuitively, transpiling Python to JS will likely perform better than compiling CPython to Wasm. OTOH, Rust compiled to Wasm will probably beat JS on number-crunching tasks.

(There is work underway to expose the native garbage collector to Wasm apps but it's not here yet.)