Optimizing loops on 8086

Alastair Dallas awd at dbase.UUCP
Wed Jun 14 03:53:51 AEST 1989


My thanks to Bruce Evans for pointing out the error in my previous posting
about optimal loops on an 8086.  Bruce points out that what I identified
as the "fast loop" opcode--JCXZ--actually takes the same time as

	DEC AX
	JZ

I must have been thinking of the LOOP instruction, which is just a hair
faster than either of these.  In re-researching this topic, I also came
across the REP prefix which would really make a loop fly, depending on
what you wanted to do in the loop.

Have no fear--Ashton-Tate's product line is not being written by dolts who
don't remember their assembly language.  I haven't written assembly for
A-T in a long, long time.

/alastair/

Disclaimer: I don't speak for them; they don't speak for me.



More information about the Comp.lang.c mailing list