woodelf wrote:
I thought the pre-fetch queue was longer than that.
Still most
instructions I bet are 3 to 4 bytes long when you
4 measly bytes: Hey, better to have 4 bytes than none at all. As for 3-4 bytes
long, remember, the Bus Interface Unit can be fetching at the same time an
instruction is executing, so that's where you go break out the Zen timer.
There are gray areas, such as:
Which is faster on 8088? A or B?
A: SHL AX,1 B: MOV CL,3
SHL AX,1 SHL AX,CL
SHL AX,1
A is faster. Now add another shift:
A: SHL AX,1 B: MOV CL,4
SHL AX,1 SHL AX,CL
SHL AX,1
SHL AX,1
B (and all subsequent increases in operand) is faster. So that's the 10% I was
mentioning where you just have to time it to find out whether or not the BIU or
EU won the race. Same goes for multiple INCs vs. ADD reg,immediate vs. ADD
reg,reg vs. ADD accum.,reg (ADDing with AX/AL is smaller/faster than with other
registers)
--
Jim Leonard (trixter at
oldskool.org)
http://www.oldskool.org/
Want to help an ambitious games project?
http://www.mobygames.com/
Or check out some trippy MindCandy at
http://www.mindcandydvd.com/