[PATCH v2 2/5] benchtests: Add memset zero fill benchtest
naohirot@fujitsu.com
naohirot@fujitsu.com
Mon Jul 26 08:42:39 GMT 2021
Hi Wilco,
>
> TIMING_NOW (start);
> for (j = 0; j < 16; j++)
> CALL (impl, s + n * j, c2, n);
> TIMING_NOW (stop);
>
> This loop is basically equivalent to CALL (impl, s, c2, n * 16), so you
Yes, but the number of function call is different between 1 time and
16 times.
> might as well change the outer loop to use a larger 'n'. The accuracy
> will be bad unless 'n' is really large, and there is no way to improve it.
Umm I couldn't understand the logic of this part.
How do we change the the outer loop to use a larger 'n'?
> If you want to test zero/non-zero combinations accurately, store the
> memset values in an array rather than using a single constant.
I changed one line as shown in the mail [1]
from
CALL (impl, s, c1, n * 16);
to
__builtin_memset (s, c1, n * 16);
Is this the array you mentioned?
[1] https://sourceware.org/pipermail/libc-alpha/2021-July/129461.html
Thanks.
Naohiro
More information about the Libc-alpha
mailing list