Xref: news2.mv.net comp.os.msdos.djgpp:6022 From: Arash 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: NNTP-Posting-Host: sv31975.ios.chalmers.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp -- Orlando Andico 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 _) \ ____________| | |.___| / / | ,___| __/ / | \__/ <__/ | / <____/