Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blake3 SIMD version #42

Open
vans163 opened this issue Dec 11, 2022 · 4 comments
Open

blake3 SIMD version #42

vans163 opened this issue Dec 11, 2022 · 4 comments

Comments

@vans163
Copy link

vans163 commented Dec 11, 2022

So there is this sightglass version but it deviates a lot due to clang being used here, many errors.

https://github.com/bytecodealliance/sightglass/blob/main/benchmarks/blake3-simd/Dockerfile

@Daninet
Copy link
Owner

Daninet commented Dec 11, 2022

I don't understand. What is the issue?

@vans163
Copy link
Author

vans163 commented Dec 11, 2022

The issue is a feature request to get SIMD version of blake3 ported+compiled, it seems the bindings emcc creates are not compatible with the JSON loading way hash-wasm does, im not even sure how to produce a .wasm compatible with the loader using emcc.

Testing the sightglass benchmarks I am also not sure what to make of them, but if I interpreted it right, the SIMD version is only 10% faster.

@Daninet
Copy link
Owner

Daninet commented Dec 11, 2022

I also measured it with some other hashing algorithms and I got similar results: SIMD only provided about 10% improvement in performance, which is not worth the effort + extra bundle size in my opinion. SIMD builds would require duplicated WASM binaries for each crypto algorithm to keep supporting browsers without SIMD.

@vans163
Copy link
Author

vans163 commented Dec 11, 2022

I also measured it with some other hashing algorithms and I got similar results: SIMD only provided about 10% improvement in performance, which is not worth the effort + extra bundle size in my opinion. SIMD builds would require duplicated WASM binaries for each crypto algorithm to keep supporting browsers without SIMD.

I was hoping 50%+ speedup with the other optimizations too (except tailcalls). Also it seems only Safari is behind on SIMD support ATM out of generally used browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants