Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> our sledgehammer binding layer is faster than SolidJS on the JSFrameworkbenchmark

What new WebAssembly things will make sledgehammer faster? JS string builtins? Direct DOM access?



Both would help. Sledgehammer is fast because it batches and interns strings on the Rust<>JS boundary.

Rust strings are utf-8 and JS strings are utf-16 (don't ask me why...).

The Dioxus VirtualDom is ridiculously fast - it's closer to the micro-dom SolidJS has (yes there's a micro-dom) than an actual virtualdom that React has.

Sledgehammer queues up all the Dioxus mutations into one fat binary batch and then runs a hand-rolled utf-8 -> utf-16 converter since the browser's converter is so slow. All the dom mutations are done from javascript. If direct DOM access landed, then we'd be able to do that from Rust directly.

And ultimately, all this work is like 10% of the actual "time" taken that you see on benchmarks. The vast majority of time is the browser running layout and re-painting. Reconciling a dom is not that hard or expensive of a task, frankly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: