home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!mansci1.UWaterloo.ca!ajrooks
- From: ajrooks@mansci1.UWaterloo.ca (Alan Rooks)
- Subject: Re: Relatively long cycle time in 486 LOOP instruction
- Message-ID: <BzDFp3.KL4@watserv1.uwaterloo.ca>
- Keywords: 486 LOOP instruction cycle
- Sender: news@watserv1.uwaterloo.ca
- Organization: University of Waterloo
- References: <fWFHrqe@quack.sac.ca.us>
- Date: Wed, 16 Dec 1992 21:29:26 GMT
- Lines: 18
-
- In article <fWFHrqe@quack.sac.ca.us> dfox@quack.sac.ca.us (David Fox) writes:
- >
- >I and others on a different network have had an ongoing thread about
- >386/486 assembler programming in general. One has posted recently
- >that the 486's LOOP and JMP [E]CX instructions seem to take an
- >inordinately long time, compared to other instructions that branch.
- >
-
- I've tested this on quite a few '486 motherboards, and always found the
- same result: all of the complex looping instructions (movs, lods, stos,
- scas, cmps, loop, loopz, loopnz, jecxz) take longer to execute than
- the series of operations that they are composed of. In other words,
- use simple instructions like dec, inc, mov, jnz, etc, and it will go
- faster. This is no doubt due to the '486's optimized execution of
- simple instructions. Remember: the '486 is a RISC, if you use the
- right instructions! :-)
-
- Alan Rooks University of Waterloo ajrooks@mansci1.uwaterloo.ca
-