www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/11/16:30:25

Xref: news2.mv.net comp.os.msdos.djgpp:5881
From: korpela AT islay DOT ssl DOT berkeley DOT edu (Eric J. Korpela)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is the quickiest way to clear memory?
Date: 11 Jul 1996 19:26:58 GMT
Organization: Cal Berkeley-- Space Sciences Lab
Lines: 21
Message-ID: <4s3ki2$btf@agate.berkeley.edu>
References: <4rgv14$7ae AT clark DOT zippo DOT com> <4rinnt$gqt AT nemesis DOT eo DOT lu>
NNTP-Posting-Host: islay.ssl.berkeley.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <4rinnt$gqt AT nemesis DOT eo DOT lu>, Dave McNeill <dmcneill AT pne DOT co DOT uk> wrote:
>Pin F. Sun wrote:
>
>memset() uses rep stosd.  you don't get much quickier than that!
>

Unless you're not using a 386.  On pentium the fastest method seems
to be an unrolled loop of fistq. (64 bits at a time)  On 486 machines
that are clock doubled or tripled, an unrolled loop of movl instructions
seems to be fastest.  rep stosd is only fastest on 386 and non-multiplied
486 machines.

I wish we'd all get over our love affair with rep stosd, rep movsd, and
the like.

Eric
-- 
Eric Korpela                        |  An object at rest can never be
korpela AT ssl DOT berkeley DOT edu            |  stopped.
<a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w">
Click here for more info.</a>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019