-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce memory consumption for populateKeyParts
`populateKeyParts` used join the same path parts over and other to construct nested arrays. Instead, we reuse the last result. See benchmark comparison: ``` benchmark old ns/op new ns/op delta BenchmarkLoadFile-16 146821 136975 -6.71% benchmark old allocs new allocs delta BenchmarkLoadFile-16 679 675 -0.59% benchmark old bytes new bytes delta BenchmarkLoadFile-16 46277 43459 -6.09% ```
- Loading branch information
Showing
2 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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