[PATCH] benchtests: New strlen-struct benchmark

Wilco Dijkstra Wilco.Dijkstra@arm.com
Wed Aug 8 15:43:00 GMT 2018


Hi Siddhesh,

So my first question is, what are you trying to benchmark here?
The strings are all identically sized so it won't stress strlen. The
layout of the structs and strings is such that it ends up as one linear 
sweep of memory (which any prefetcher should be able to spot).
Would better results on this test mean real code gets faster too?

If you want to benchmark strlen in a more realistic way then it would
make sense to do something like the random memcpy (create an
array of strings based on a measured distribution and ensure the
strings are not laid out linearly in memory).

If you have a specific workload you want to mimic then it may be
better to keep it closer to the original code. Traversing a linked list of
10000 entries with 32KB strings seems quite unusual...

Cheers,
Wilco



More information about the Libc-alpha mailing list