Re:Using WebAssembly to turn Rust crates into fast TypeScrip...
by davidatbu on Monday July 03, 2023 @04:26AM
(#36570265)
Dioxus is also a vDOM based framework (like React). Leptos is a fine-grained-reactivity framework (like SolidJS/Svelte).
They are both _way_ faster than React, and they are both faster than Vue and Svelte by a larger magnitude than SolidJS is faster than either of them.
That is not because Dioxus/leptos have less features than Yew. I'd actually argue they are more feature-full [1].
For icing on the cake: the most "bare-bones" WASM/Rust based entry to the benchmarks, "sledge-hammer", is as fast as the most bare-bones JS entry.
There are valid reasons for not using a Rust frontend framework (over-the-wire size, compilation speed, ecosystem, ..etc), but execution/DOM-manipulation speed is not one of them.
[1] I've used leptos, and tried out Yew, and have read through the docs of all three.
Either way it's clear that even a compile time language with no garbage collection can't get faster than the DOM itself allows, which is the crux of my point. In theory a compiled language should run at least twice as fast as JS, but it's not the case in the browser.