lkml.org 
[lkml]   [2003]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: memset (was: Redundant memset in AIO read_events)
From
Date
On Thu, 2003-07-10 at 12:04, Etienne Lorrain wrote:
> Note that using memset() is better reserved to initialise variable-size
> structures or buffers. Even if memset() is extremely optimised,
> it is still not as fast as not doing anything.

this is not always true....
memset can be used as an optimized cache-warmup, which can avoid the
write-allocate behavior of normal writes, which means that if you memset
a structure first and then fill it, it can be halve the memory bandwidth
and thus half as fast. This assumes an optimized memset which we
*currently* don't have I think... but well, we can fix that ;)

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:1.222 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site