Closed twoeths closed 4 months ago
✔️ no performance regression detected
by benchmarkbot/action
the benchmark result in CI is not precise because it run with very short period of time, updated it to run at least 10s
setBenchOpts({
minMs: 10000,
});
Do we need to store
build
artifacts in the repo?
yes, they are actually input for our typescript function every time we run, that's why they are tracked in git
Do we need to store
build
artifacts in the repo?yes, they are actually input for our typescript function every time we run, that's why they are tracked in git
Is this what you are referring to? Looks like we only care about codegen
being called to update https://github.com/ChainSafe/ssz/blob/master/packages/as-sha256/src/wasmCode.ts (as correctly done by this PR), but wasm/wat don't need to be in git?
Not part of this PR anyway, maybe something to be considered to improve the build process.
checked the performance on a separate server and got same result to my local environment
master feat4 mainnet
digestTwoHashObjects vs digest64 vs digest
✓ digestTwoHashObjects 50023 times 19.25844 ops/s 51.92528 ms/op - 67 runs 3.98 s
✓ digest64 50023 times 20.23583 ops/s 49.41730 ms/op - 12 runs 1.11 s
✓ digest 50023 times 20.31116 ops/s 49.23402 ms/op - 13 runs 1.19 s
this branch
digestTwoHashObjects vs digest64 vs digest
✓ digestTwoHashObjects 50023 times 21.91978 ops/s 45.62089 ms/op - 1304 runs 60.0 s
✓ digest64 50023 times 21.11148 ops/s 47.36759 ms/op - 1256 runs 60.0 s
✓ digest 50023 times 20.90464 ops/s 47.83628 ms/op - 1244 runs 60.0 s
however benchmark result in CI consistently shows worse statistics so need to investigate this, may need to separate to smaller PRs in order to figure out the issue
Motivation
Improve
digest64
Description
assemblyscript
yields better performancew
computation to the main loop inhashBlocks()
Uint8Array.slice()
Before:
After
digestTwoHashObjects
is ~10% faster anddigest64
is ~5% faster