home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11709 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.4 KB  |  31 lines

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