-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protobuf: remove double ptr_ load in arena allocation
Currently the generated code contains 2 loads of ptr_ b/c it's an atomic: one in HasSize and one in AllocateFromExisting. Combine these to be a single load. name old cpu/op new cpu/op delta BM_ArenaAlloc/100 250ns ± 2% 229ns ± 1% -8.20% (p=0.000 n=54+47) BM_ArenaAllocWithCleanup/100 865ns ± 1% 812ns ± 2% -6.15% (p=0.000 n=57+56) PiperOrigin-RevId: 563698727
- Loading branch information
1 parent
7dabac9
commit de87585
Showing
2 changed files
with
34 additions
and
33 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