Skip to content

Conversation

@jedisct1
Copy link
Contributor

@jedisct1 jedisct1 commented Nov 3, 2025

Compute all contexts and store them in a pre-allocated array, then spawn threads using the pre-computed contexts.

This ensures each context is fully materialized in memory with the correct values before any thread tries to access it.

Also unroll the permutation rounds only twice.

This appears to deliver the best performance thanks to improved cache utilization, and it’s consistent with what we already do for regular SHA3.

Compute all contexts and store them in a pre-allocated array,
then spawn threads using the pre-computed contexts.

This ensures each context is fully materialized in memory with the
correct values before any thread tries to access it.
This appears to deliver the best performance thanks to improved cache
utilization, and it’s consistent with what we already do for SHA3.
@jedisct1 jedisct1 merged commit ee4df4a into ziglang:master Nov 3, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

1 participant