From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: either I'm stupid or GCC once again has random behaviour Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <92o5uf$702n5$1 AT ID-57378 DOT news DOT dfncis DOT de> <978314359 DOT 13074 DOT 0 DOT nnrp-02 DOT 9e989cbe AT news DOT demon DOT co DOT uk> <92ophd$7kdsq$1 AT ID-57378 DOT news DOT dfncis DOT de> <8fd45t46ttftcmahol8erf6sipdjfs9v8v AT 4ax DOT com> <92tlcf$8accm$1 AT ID-57378 DOT news DOT dfncis DOT de> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 11 X-Trace: /wsFGz/tDAV/sOjcHIRkWeQ2q9aKxClf1+U+cYjNPjRqzU1aV6DeckemTAn1FJhRzFQavtIYKcaX!eyFA87oFuM1jtCZ8KcpcDHVqWNsiV3SNDeXh2WO6lbu1EBRewgpUmJvqZyj2Pbs7YW1QxPq+xJPu!s3U= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Fri, 05 Jan 2001 14:26:04 GMT Distribution: world Date: Fri, 05 Jan 2001 14:26:04 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Tue, 2 Jan 2001 17:41:07 -0500, "Alexei A. Frounze" wrote: >Why unrolling? There is a perfect instruction REP STOSB/W/D. >What do you mean? On modern x86 CPUs a loop of simple instructions (which can be split among the U and V (and W in PII) pipelines) is actually _faster_ than the string instructions (which are complex, run in microcode, and can fit only in U). To fit code into the pipeline without time-consuming branching, unrolling loops is a necessity.