3 ms·
https://programming-language-benchmarks.vercel.app/javascript-vs-wasm https://programming-language-benchmarks.vercel.app/javascrip...
by password54321 3y ago
https://programming-language-benchmarks.vercel.app/javascript-vs-wasm https://programming-language-benchmarks.vercel.app/javascrip...
- kevingadd 3y agoThese aren't like-for-like comparisons, as demonstrated by how there are multiple implementations of each 'benchmark'. Picking the fastest JS and non-JS binary trees there, for example, the JS one relies on the garbage collector, which means that in practice it can bump allocate all of its temporary objects, and the GC will never run, so they will never be freed. The Rust one in comparison is allocating a bunch of ref-counted handles. It is automatically going to lose. EDIT: I dug around that site more and if you pull up 'JavaScript vs Rust' for the same benchmark, JS is still faster. So I don't understand why you're even using this for a 'JS is faster than WASM' argument if it appears to be saying that JS is also faster than Rust.
- password54321 3y ago>EDIT: I dug around that site more and if you pull up 'JavaScript vs Rust' for the same benchmark, JS is still faster. So I don't understand why you're even using this for a 'JS is faster than WASM' argument if it appears to be saying that JS is also faster than Rust. This doesn't appear to generally be the case and some outliers are to be expected in benchmarks. >'JS is faster than WASM' Was never the argument.