diff options
author | 2023-09-20 10:26:25 -0700 | |
---|---|---|
committer | 2023-09-20 10:27:09 -0700 | |
commit | c45a4393c075fb0e50e408d9b69035a42ed2617c (patch) | |
tree | 2b0e228ce7a1a564b5d5d9724257706307c606e5 /absl/log/scoped_mock_log.h | |
parent | adcaae433fe10da72bc4f8b61eaf559604b81d03 (diff) |
absl:speed up Mutex::[Reader]TryLock
Tidy up Mutex::[Reader]TryLock codegen by outlining slow path
and non-tail function call, and un-unrolling the loop.
Current codegen:
https://gist.githubusercontent.com/dvyukov/a4d353fd71ac873af9332c1340675b60/raw/226537ffa305b25a79ef3a85277fa870fee5191d/gistfile1.txt
New codegen:
https://gist.githubusercontent.com/dvyukov/686a094c5aa357025689764f155e5a29/raw/e3125c1cdb5669fac60faf336e2f60395e29d888/gistfile1.txt
name old cpu/op new cpu/op delta
BM_TryLock 18.0ns ± 0% 17.7ns ± 0% -1.64% (p=0.016 n=4+5)
BM_ReaderTryLock/real_time/threads:1 17.9ns ± 0% 17.9ns ± 0% -0.10% (p=0.016 n=5+5)
BM_ReaderTryLock/real_time/threads:72 9.61µs ± 8% 8.42µs ± 7% -12.37% (p=0.008 n=5+5)
PiperOrigin-RevId: 567006472
Change-Id: Iea0747e71bbf2dc1f00c70a4235203071d795b99
Diffstat (limited to 'absl/log/scoped_mock_log.h')
0 files changed, 0 insertions, 0 deletions