Open
Conversation
* fix: optimise duplicate writing in leafnode creation * chore: apply same temp array rewriting in packedUintNum64sToLeafNodes * chore: only anntend to specific dev comment before feedback
Performance Report✔️ no performance regression detected Full benchmark results
|
Comment on lines
+114
to
+117
| // Precompute final h values once | ||
| const hValues = [0, 0, 0, 0, 0, 0, 0, 0]; | ||
|
|
||
| // Whole 4-byte words we can take directly |
There was a problem hiding this comment.
i see here, that the real only thing of note that you only change from my implemtation is
const hValues = new Array(8).fill(0);
// to
hValues = [0, 0, 0, 0, 0, 0, 0, 0]; is there any computation benfit against using Array.fill here?
Member
There was a problem hiding this comment.
likely doesn't matter, but using a literal may be faster.
twoeths
reviewed
Sep 1, 2025
Contributor
twoeths
left a comment
There was a problem hiding this comment.
would be great to know how does this PR impacts the performance through benchmarks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Improve the performance of lead node creation during the packing values.
Description
LeafNodeobjectLeftNodeobject once with those values.Based on the work started in this PR #493
Steps to test or reproduce
Run all tests.