diff options
author | Kevin Svetlitski <svetlitski@meta.com> | 2023-05-01 11:49:35 -0700 |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2023-05-04 09:59:17 -0700 |
commit | 6841110bd6ed17b32a5fed90c53c64555366a792 (patch) | |
tree | 115552e87390cf557e116304ebcf69bc659884f5 /ChangeLog | |
parent | f2b28906e63bef7518c58236e3e9dde8e4fceb89 (diff) | |
download | jemalloc-6841110bd6ed17b32a5fed90c53c64555366a792.tar.gz |
Make `edata_cmp_summary_comp` 30% faster
`edata_cmp_summary_comp` is one of the very hottest functions, taking up
3% of all time spent inside Jemalloc. I noticed that all existing
callsites rely only on the sign of the value returned by this function,
so I came up with this equivalent branchless implementation which
preserves this property. After empirical measurement, I have found that
this implementation is 30% faster, therefore representing a 1% speed-up
to the allocator as a whole.
At @interwq's suggestion, I've applied the same optimization to
`edata_esnead_comp` in case this function becomes hotter in the future.
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions