llvm-project/libc/test
Michael Jones 8298424cae [libc] refactor atof string parsing
Split the code for parsing hexadecimal floating point numbers from the
code for parsing the decimal floating point numbers so that the parsing
can be faster for both of them.

This decreases the time for the benchmark in release mode by about 15%,
which noticeably beats GLibc.

Old version: 2.299s
New version: 1.893s
GLibc: 2.133s

Tests run by running the following command 10 times for each version:
time ~/llvm-project/build/bin/libc_str_to_float_comparison_test ~/parse-number-fxx-test-data/data/*

the parse-number-fxx-test-data-repository is here:
fe94de252c

It's important to build llvm-libc in Release mode for accurate
performance comparisons against glibc (set -DCMAKE_BUILD_TYPE=Release in
your cmake).
You also have to build the libc_str_to_float_comparison_test target.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D113036
2021-11-09 10:12:18 -08:00
..
config [libc][NFC] Move utils/CPP to src/__support/CPP. 2021-10-28 15:50:00 +00:00
integration [libc] make the scudo integration test run 2021-08-20 17:51:11 +00:00
loader [libc] Normalize LIBC_TARGET_MACHINE 2021-05-05 15:52:42 +00:00
src [libc] refactor atof string parsing 2021-11-09 10:12:18 -08:00
utils [libc][NFC] Move utils/CPP to src/__support/CPP. 2021-10-28 15:50:00 +00:00
CMakeLists.txt [libc] Add a new suite called "libc-long-running-tests". 2021-08-21 05:01:28 +00:00
ErrnoSetterMatcher.h [libc][obvious] Move ErrnoSetterMatcher to test/ErrnoSetterMetcher.h. 2020-07-28 11:05:52 -07:00