You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The keys are de-deduped on the backend as they are saved within a map[...]... component so it doesn't really in terms of space saving.
Now the question boils down to does adding a HashSet to dedupe keys is worth it vs the extra processing happening when we send multiple time the same key to the backing engine. My gut feeling tells me it will be more efficient to leave them as-is and avoid the HashSet.
I'm not totally sure how to prove this. I've just added a benchmarking setup on ethereum-common, I can at least probably gather the difference time this adds to see the impact of just adding HashSet.
Ah yes, makes sense. Probably not worth it compacting keys in the module then. Feel free to close this PR if your benchmark doesn't show any improvement.
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
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.
Implements #10
Reduces number of index keys 3-4x for Ethereum mainnet.