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 support #207

Open
nate-thirdwave opened this issue Jun 11, 2024 · 1 comment
Open

blake3 support #207

nate-thirdwave opened this issue Jun 11, 2024 · 1 comment

Comments

@nate-thirdwave
Copy link

Using startup --digest_function=blake3 for bazel invocations yields execution results that are unparseable by bb-browser:
image

blake3 is much faster than sha256.

@EdSchouten EdSchouten transferred this issue from buildbarn/bb-browser Jun 11, 2024
@EdSchouten
Copy link
Member

blake3 is much faster than sha256.

Only in certain cases. I did some benchmarking on an Apple M1 CPU some time ago, and I wasn’t able to achieve a throughput with BLAKE3 that was anywhere near SHA-256.

BLAKE3 is only faster on CPU architectures that provide wide SIMD support (e.g., AVX2), but don’t offer native SHA-256 instructions. And there it’s also only faster for large inputs. In the case of REv2 we see that clients must do lots of hashing of small inputs (<1KB), meaning that BLAKE3 is a bad fit.

That said, if people really want to see BLAKE3 support being added to Buildbarn, feel free to submit a PR. Changes need to be made to bb-storage/pkg/digest.

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