News for hackers. Stuff that matters.
Re:Using WebAssembly to turn Rust crates into fast TypeScrip... by foota on Sunday July 02, 2023 @03:47AM (#36559265)
I'm confused, doesn't this show wasm bindgen performing near vanilla js? Admittedly, there's overhead, but fairly minimal. My assumption is that DOM operations are slow because of what they do under the hood, not because of the overhead of calling them.
Re:Using WebAssembly to turn Rust crates into fast TypeScrip... by chrisco255 on Sunday July 02, 2023 @07:44PM (#36567011)
It does show that, but vanilla JS is 20-30% faster on some of those benchmarks, and the fastest library in the test is a minimal JS lib. Either way, you would expect that a compiled, non-garbage collected, language should be able to achieve 50% or more improvement in speed over JS, but that's not the case in the browser, because the DOM is the bottleneck.
Re:Using WebAssembly to turn Rust crates into fast TypeScrip... by davidatbu on Monday July 03, 2023 @04:42AM (#36570366)
Like I said somewhere else "sledge-hammer" is _just as fast_ as Vanilla JS in those benchmarks (it's one of the "Vanilla Rust"/bare-bones entries to the benchmark).