This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: memcpy walk benchmark [was: Hoist ZVA check out of the memset function]


Siddhesh Poyarekar wrote:
    
> Ahh wait, my intention was to start from s_end and go down to s,
> decrementing along the way.  That should have different behaviour from
> incrementing since the latter will tune hardware prefetchers for future
> iterations, thus skewing readings.

Right, that seems like a good approach.

> I'll post a fix for both those issues and re-test memset.  Any other
> comments on the test?  BTW, I thought you were talking about memcpy and
> not memset.  Can you please review those tests as well?

They are identical so have the same issues. For memcpy/memmove I don't
think it is a good idea to copy the same data back and forth, since that's not
a common usage scenario, but also because it might penalize cores that
bypass L1 for write streams.

Generally the tests don't run long enough (even if they do access all 32MB),
so I'd say they need an outer loop to repeat say 20 times. Also if we do
exactly the same amount of work for each possible size, printing the total
time would make comparing results between different sizes a bit easier.

Wilco


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]