Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

optimised w+k for digest64 #59

Merged
merged 2 commits into from
Aug 9, 2021
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Aug 6, 2021

updated to W64 to W64+K for additional optimization as pointed by @potuz, to save 64 adds and 64 mem loads

image

Also mystery of variable performance on various machines was resolved:

  1. The previous test/bench.js, was generating the random buffer inside the bench loop, causing interference of that as it also involved Math.Random, multiplications and rounds off.
  2. The cpu clock turbo boosts should be switched off for true comparison (minor factor in enviorments where there is a fixed cpu clock but causing huge variation where there are turbo boosts as the computation profile of normal digest and digest64 become very different)

pre W+K optimization digest64 performance with bench fixed : ~ 24% faster than normal digest
preKOpt

post W+K optimization: ~ 29% faster than normal digest
WplusK

GAIN: ~ 5%
@dapplion @wemeetagain
ps: this branch doesn't include uint8 optimization gains to be added by @tuyennhv PR!

assembly/index.ts Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants