diff options
author | 2022-06-09 03:12:43 -0700 | |
---|---|---|
committer | 2022-06-09 03:13:29 -0700 | |
commit | 7383f346c9e33a08ed2132f117b3de6b13eac173 (patch) | |
tree | 2f7c916152eb449e7eb672832824334802db78d3 /absl/strings/string_view_benchmark.cc | |
parent | e0a32c2aee27aadce321471be734d7643d7d9439 (diff) |
Optimize SwissMap iteration by another 5-10% for ARM
https://pastebin.com/fDvgWgHe
After having a chat with Dougall Johnson (https://twitter.com/dougallj/status/1534213050944802816), we realized that __clzll works with zero arguments per documentation:
https://developer.arm.com/documentation/101028/0009/Data-processing-intrinsics
```
Returns the number of leading zero bits in x. When x is zero it returns the argument width, i.e. 32 or 64.
```
Codegen improves https://godbolt.org/z/ebadf717Y
Thus we can use a little bit different construction not involving CLS but using more understandable CLZ and removing some operations.
PiperOrigin-RevId: 453879080
Change-Id: Ie2d7f834f63364d7bd50dd6a682c107985f21942
Diffstat (limited to 'absl/strings/string_view_benchmark.cc')
0 files changed, 0 insertions, 0 deletions