about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-03-23 16:57:14 -0500
committerNoah Goldstein <goldstein.w.n@gmail.com>2022-03-25 11:46:13 -0500
commitece0eaa3f8f2a1b5911ca57659249d8a532d5c03 (patch)
treee430ccffe52d27c40e9caa561c42fe79af117f04 /sysdeps/x86_64/multiarch
parent4c5200dd9fc7c5867a5c7cb7bfce083f060a378f (diff)
downloadglibc-ece0eaa3f8f2a1b5911ca57659249d8a532d5c03.tar.gz
glibc-ece0eaa3f8f2a1b5911ca57659249d8a532d5c03.tar.xz
glibc-ece0eaa3f8f2a1b5911ca57659249d8a532d5c03.zip
benchtests: Add random benchmark in bench-strchr.c
Add benchmark that randomizes whether return should be NULL or pointer
to CHAR. The rationale is on many architectures there is a choice
between a predicate execution option (i.e cmovcc on x86) or a branch.

On x86 the results for cmovcc vs branch are something along the lines
of the following:

perc-zero, Br On Result, Time Br / Time cmov
     0.10,            1,              ,0.983
     0.10,            0,              ,1.246
     0.25,            1,              ,1.035
     0.25,            0,              ,1.49
     0.33,            1,              ,1.016
     0.33,            0,              ,1.579
     0.50,            1,              ,1.228
     0.50,            0,              ,1.739
     0.66,            1,              ,1.039
     0.66,            0,              ,1.764
     0.75,            1,              ,0.996
     0.75,            0,              ,1.642
     0.90,            1,              ,1.071
     0.90,            0,              ,1.409
     1.00,            1,              ,0.937
     1.00,            0,              ,0.999
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/multiarch')
0 files changed, 0 insertions, 0 deletions