-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
34257: pretty: make union and concat pointer receivers r=jordanlewis a=jordanlewis Previously, union and concat were struct receivers in the Doc type, which led to pathological hashing behavior when inserting into the memoiDoc map. This commit switches them to pointer receivers, which makes everything a lot faster. ``` name old time/op new time/op delta PrettyData-8 202ms ± 4% 66ms ± 2% -67.35% (p=0.000 n=10+10) name old alloc/op new alloc/op delta PrettyData-8 24.7MB ± 0% 30.7MB ± 0% +24.10% (p=0.000 n=10+10) name old allocs/op new allocs/op delta PrettyData-8 8.29k ± 0% 9.17k ± 0% +10.59% (p=0.000 n=10+10) ``` Helps #33649. Release note: None Co-authored-by: Jordan Lewis <[email protected]>
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 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
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