Samsung / walrus

WebAssembly Lightweight RUntime
Apache License 2.0
39 stars 10 forks source link

Add matrix multiplication benchmark #189

Closed ghost closed 10 months ago

ghost commented 10 months ago

Hi! This is my first PR, so I hope I'm doing it correctly.

I started adding SIMD benchmarks from this WASM SIMD repo.

The first is a double precision matrix multiplication benchmark, which covers these previously not benchmarked instructions:

f64x2.add
f64x2.mul
v128.load64_splat

I also have a tiny bash script for listing which instructions are covered in the benchmarks, let me know if I should include that in the PR as well.

zherczeg commented 10 months ago

NIce! Would be good to split it into two benchmarks, because this way the performance of simd an non-simd variant cannot be compared

ghost commented 10 months ago

Hmm, then the result will need to be checked differently. I'll try using a CRC32 checksum, since that's quick to calculate and doesn't add much code.

zherczeg commented 10 months ago

A simple sum could be enough

ghost commented 10 months ago

That should do it.