diff options
author | Elliott Hughes <enh@google.com> | 2017-12-20 17:37:11 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-12-21 17:44:22 -0800 |
commit | cb239bda6569c48efd3925bb87682fc0efa077fd (patch) | |
tree | becb3004fc64eee97b8dd3af604787b8a8eaa161 /linker/linker_libcxx_support.cpp | |
parent | 2c5f914584704878d6d1e0225304bd48844329e3 (diff) |
Simplify atoi*/strto* for signed integers.
Make the cost of strto<signed> closer to the cost of strto<unsigned>
by removing an `if` from the inner loop. Previously a signed conversion
cost 10ns more than an unsigned one.
After:
BM_inttypes_strtoimax 81 ns 81 ns 8603362
BM_inttypes_strtoumax 78 ns 78 ns 8967174
BM_stdlib_strtol 81 ns 81 ns 8685537
BM_stdlib_strtoll 81 ns 81 ns 8685481
BM_stdlib_strtoul 78 ns 78 ns 8962569
BM_stdlib_strtoull 78 ns 78 ns 8972023
Bug: N/A
Test: ran tests, benchmarks
Change-Id: I72dd5499427b6a940bd94c4d6f727f7efe134d7e
Diffstat (limited to 'linker/linker_libcxx_support.cpp')
0 files changed, 0 insertions, 0 deletions