fitzgen / dodrio

A fast, bump-allocated virtual DOM library for Rust and WebAssembly.
https://docs.rs/dodrio
Mozilla Public License 2.0
1.24k stars 48 forks source link

Are there any benchmarks? #38

Open MaxGraey opened 5 years ago

MaxGraey commented 5 years ago

It will be great have some one on this site: https://stefankrause.net/js-frameworks-benchmark8/table.html

MaxGraey commented 5 years ago

I saw this: https://hacks.mozilla.org/2019/03/fast-bump-allocated-virtual-doms-with-rust-and-wasm

Library Optimized? Milliseconds
Angular 2 Yes 2371
Dodrio 0.1-prerelease No 2181

But Angular is not fastest framework. It will be great see comparison with vanilla js (as baseline) and stdweb .

liamcurry commented 5 years ago

FYI I created an implementation of that benchmark for wasm-bindgen that can be used as a point of reference/starting point: https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed/wasm-bindgen

It looks like wasm-bindgen is pretty fast! Currently it's ranked 4th https://krausest.github.io/js-framework-benchmark/current.html

Another benchmark worth mentioning is UIBench. https://localvoid.github.io/uibench/ I like this one because it's easier to implement and run benchmarks. Here's a wasm-bindgen implementation I created as a point of reference:

MaxGraey commented 5 years ago

Yes, pure wasm-bindgen as well as stdweb pretty fast, but frameworks with vdom like yew (which use stdweb under the hood) is one of the slowest frameworks compared to JavaScript based

liamcurry commented 5 years ago

The wasm-bindgen benchmarks are ports of the vanilla JS implementations so they show the overhead costs vs JS.

Also there's nothing inherently wrong with VDOM. ivi uses VDOM and it's pretty fast. I imagine a Rust port would perform similarly, adjusting for overhead.

fitzgen commented 5 years ago

Looks like you've seen all the benchmarking that currently exists.

Working on an implementation for js-framework-benchmark, and will also see if that turns up any more interesting corners of perf to look at. Thanks for your patience :)

krausest commented 5 years ago

Looking forward to getting your PR. Let me know if you run into problems with the benchmark and I‘ll try to help.

Th3Whit3Wolf commented 4 years ago

Any updates on this? I'd love to see how dodrio performs in benchmarks vs other wasm projects and javascript frameworks.