Repository navigation
perf: look up open cores by key before hashing the discovery key - #190
Draft
danielAsaboro wants to merge 3 commits into
Draft
danielAsaboro wants to merge 3 commits into
danielAsaboro wants to merge 3 commits into
Conversation
This branch has not been deployed
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.
Stacked on #189; review that one first. Only the last commit is new here.
get({ key })on a core that's already open still runscrypto.discoveryKey(BLAKE2b) in_authbefore it can look the core up. This adds a second slot index over the same dense core array, keyed by the core's public key, and checks it first. The hash only runs on a miss.get({ key })that falls back to a lookup by discovery key.validation
test/cores.jsnow also checks the key index against a referenceMap, including the replace path above. That test caught a stale-entry bug in an earlier draft. Node and Bare 55/55,npm run lintclean.numbers
get({ key })on an open core, vs #189cores.get(dk), vs #189get({ key }), vs mainSame method as #189: both checkouts in one process, 1000 open cores, 11 alternating paired runs.