Skip to content

Keep accumulator lanes in locals in accumulate() - #14

Open
modulovalue wants to merge 1 commit into
SamJakob:masterfrom
modulovalue:perf-accumulate-locals
Open

modulovalue wants to merge 1 commit into
SamJakob:masterfrom
modulovalue:perf-accumulate-locals

Conversation

@modulovalue

Copy link
Copy Markdown

accumulate() loaded and stored every accumulator lane through the Uint64List for each 8 bytes of input. It now keeps the eight lanes in local variables (a manually inlined accumulate512) and writes them back once per block.

xxh3_sweep

About 1.9x faster on long inputs on arm64, 1.4x on x86-64 (AOT).
@SamJakob

Copy link
Copy Markdown
Owner

Nice one! Thank you for this, I'll take a look.

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.

2 participants