wasm-bindgen
wasm-bindgen copied to clipboard
Is a wasm-bindgen-bench crate possible today?
I know that you can write your own test runners, but could you also do this:
#[wasm_bindgen_bench]
fn my_benchmark() {
// ...
}
?
The impetus here is me working on a renderer and wanted an easily compare potential performance enhancements in real browsers.
Something like this would make that trivial... but I don't know if this is even technically possible at this time?
Cheers!
It should be possible, yes! I've been thinking about trying to port criterion over to wasm: https://docs.rs/criterion/0.2.5/criterion/
Woah smooth - thanks a lot for the link!
I'm curious - in your mind is it more or less a straight up port or are there a bunch of wasm specific considerations that would come into play?
In the meantime I'll give criterion
and wasm-bindgen-test
a read to get more familiar...
Should this issue be left open to maybe lay out what benchmarking support might look like?
I haven't looked into criterion
's code at all yet, just something in the back of my mind. I've only used it, and been very pleased with the result.
Yeah, we can keep this issue open to discuss :)
Does the new WASM support of criterion
have any impact to this issue?