[lkml]   [1996]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Ideas for reducing memory copying and zeroing times (fwd)

On Fri, 19 Apr 1996, Michael Riepe wrote:
> I guess the fastest (and shortest) way to do that on an 80x86 is:
> xorl %eax,%eax
> leal 4096(page_start),%esp
> <repeat 1024 times>
> pushl %eax
> <end repeat>

No, the fastest, and shortest way to do it is

.. dest in %edi ..
movl $1024,%ecx
xorl %eax,%eax
rep; stosl

Which is in fact exactly how linux does it..

Of course, if you have an old x86 chip, that's your problem and you may
not get optimal performance, but who expected anything else from old

(Hint: the above _really_ flies on a PPro. Intel optimized it to do
cache-line accesses, it seems. They did the right thing)


 \ /
  Last update: 2005-03-22 13:37    [W:0.042 / U:0.660 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site