Re: No difference on my machine
- From: "Wolfgang Kern" <nowhere@xxxxxxxx>
- Date: Sun, 11 Nov 2007 12:04:32 +0100
Nathan and Frank in discussion about:
[Comparing 'xor eax, eax' with 'mov eax, 0' from the CLAX thread:]
Good one, Nathan! No difference on my P4, that I can notice. Replacing
"dec" with "sub" gives a big speedup, though...
Just tried with "sub" and it took a second longer in all but one run.
There shouldn't be a difference on any x86 except that xor eax,eax
is shorter and this will affect the code alignment after it.
So a replacment may sometimes (like the example in CLAX) slow down.
I cannot confirm that add/sub-1 is any faster than inc/dec on AMDs.
It again is of different size and may therefore affect timing like above.
__
wolfgang
.
- Follow-Ups:
- Re: No difference on my machine
- From: Frank Kotler
- Re: No difference on my machine
- From: Betov
- Re: No difference on my machine
- References:
- No difference on my machine
- From: Evenbit
- Re: No difference on my machine
- From: Frank Kotler
- Re: No difference on my machine
- From: Evenbit
- No difference on my machine
- Prev by Date: Re: oRosAsm
- Next by Date: need help about pause instruction
- Previous by thread: Re: No difference on my machine
- Next by thread: Re: No difference on my machine
- Index(es):
Relevant Pages
|
|