This repository was archived by the owner on Sep 11, 2020. It is now read-only.
plumbing: format/idxfile, avoid creating temporary buffers to decode integers#1136
Merged
mcuadros merged 3 commits intosrc-d:masterfrom Apr 26, 2019
Merged
plumbing: format/idxfile, avoid creating temporary buffers to decode integers#1136mcuadros merged 3 commits intosrc-d:masterfrom
mcuadros merged 3 commits intosrc-d:masterfrom
Conversation
…integers Signed-off-by: Filip Navara <[email protected]>
Contributor
Author
31e24b6 to
1f19576
Compare
…y not using iterator and not loading CRC Signed-off-by: Filip Navara <[email protected]>
…iterator twice Signed-off-by: Filip Navara <[email protected]>
jfontan
reviewed
Apr 26, 2019
| copy(hash[:], idx.Names[mappedFirstLevel][secondLevel*objectIDLength:]) | ||
| offset := int64(idx.getOffset(mappedFirstLevel, int(secondLevel))) | ||
| idx.offsetHash[offset] = hash | ||
| secondLevel++ |
Contributor
Author
There was a problem hiding this comment.
Nope. The loop is a bit weird since it's iterating over two variables. Maybe there's some better Go syntax for it?
secondLevel goes from 0 to maximum value on that fanout level (not checked directly). i goes from 0 over both the inner and outer loop and bounds the inner loop.
jfontan
approved these changes
Apr 26, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

On Linux repository (210 MB pack index; 6,596,227 objects) this saves around 2 seconds in
genOffsetHashfunction.