Benchtests: Improve memrchr benchmarks
authorNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 7 Jun 2022 04:11:29 +0000 (21:11 -0700)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 7 Jun 2022 20:09:16 +0000 (13:09 -0700)
commitd0370d992e5e7b4a8843e8e130f6c86b483ab7d0
tree7a3aafc1838d351daf924327fbc7c8586d8745fc
parentdd5c483b2598f411428df4d8864c15c4b8a3cd68
Benchtests: Improve memrchr benchmarks

Add a second iteration for memrchr to set `pos` starting from the end
of the buffer.

Previously `pos` was only set relative to the beginning of the
buffer. This isn't really useful for memrchr because the beginning
of the search space is (buf + len).
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
benchtests/bench-memchr.c