delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/16/01:35:54

Xref: news2.mv.net comp.os.msdos.djgpp:6022
From: Arash <ei39594 AT ios DOT chalmers DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is the quickiest way to clear memory?
Date: 15 Jul 1996 16:00:07 GMT
Organization: Chalmers University of Technology
Lines: 31
Message-ID: <4sdpu7$of6@nyheter.chalmers.se>
References: <Pine DOT SGI DOT 3 DOT 93 DOT 960712074101 DOT 1646D-100000 AT gibson DOT eee DOT upd DOT edu DOT ph>
NNTP-Posting-Host: sv31975.ios.chalmers.se
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


-- Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph> wrote:
>On 11 Jul 1996, Eric J. Korpela wrote:
>> 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 THINK the best way is something like
  memset((void *) 0xa0000 + __djgpp_conventional_base,0,64000);
could do the trick. (I don't know if nearptr is faster than farptr)
You have fixed size -> rep movl (not movb!!), and -m486 -O2 
-funroll-loops -> unrolles loops just to fit in chache and no more!

Any way if this is wrong, I have to totaly rewrite my game :(




-Arash
   _____                            |\/\/\/|     
  /     \      _____________        |      |      _______________
\/\/     |    | diz sux...  \       |      |     |  way too much |
 |  (c)(c)    | ..he he cool|       | (o)(o)     |  MTV dad!     |
 C   .---_)   |  __________/        S      _)    \   ____________|
  | |.___|   /  /                   | ,___|    __/  /
  |  \__/   <__/                    |    /    <____/


- Raw text -


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