diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-04-09 11:49:18 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2019-04-09 11:49:18 +0100 |
commit | 93eebae5168e5cf2abfb4b6266e3fb2ab860cd60 (patch) | |
tree | 35d49030fe55bc33b5f55c3e68adaadede82f209 /COPYING.LIB | |
parent | a173d09f85a1f7e74e8b7ae7da04743a77cc7552 (diff) | |
download | glibc-93eebae5168e5cf2abfb4b6266e3fb2ab860cd60.tar.gz glibc-93eebae5168e5cf2abfb4b6266e3fb2ab860cd60.tar.xz glibc-93eebae5168e5cf2abfb4b6266e3fb2ab860cd60.zip |
Improve bench-strstr
Improve bench-strstr by using an extract from the manual as the input to make the test more realistic. Use the same input for both found and fail cases rather than using a memset of '0' for most of the string, which measures performance of strchr rather than strstr. Add result checking to catch potential errors. Remove the repeated tests at slightly different alignments and add more large needle and haystack testcases. Replace stupid_strstr with an efficient basic implementation. Add the Two-way implementation to simplify comparisons with much faster generic implementations. * benchtests/bench-strstr.c (input): Add realistic input text. (stupid_strstr): Remove function. (basic_strstr): Add function. (twoway_strstr): Add function. (do_one_test): Add result checking. (do_test): Use new input text. Remove accidental early matches. (test_main): Improve range of tests, reduce unaligned cases.
Diffstat (limited to 'COPYING.LIB')
0 files changed, 0 insertions, 0 deletions