Re: Fastest IA32 nops - single- and multi-byte
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: Sat, 21 Mar 2009 12:26:38 -0400
"James Harris" <james.harris.1@xxxxxxxxxxxxxx> wrote in message
news:c3f2dd02-3fbb-4843-b2ff-563c237e1ff1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
That could be useful. I've copied the full source I was using to a
temporary page
http://codewiki.wikispaces.com/time-it.nasm
If you have a copy of Windows you should be able to copy, build and
run it as it stands.
Despite having both Windows (Win98SE) and a recent version of NASM, I seem
to be missing whatever provides "win32n.inc"...
And, are the Win32 functions valid for Win98SE or just newer
Win2k/NT/XP/Vista? See, you still haven't stated your test platform OS...
Regarding your comments: I've tried timing code with three leading
CPUIDs but found that recommendation to be unhelpful. Sometimes the
third CPUID was markedly slower than the second one. To deal with the
CPUID variability and all the other sources of jitter that you mention
I have seen better (more consistent) results by running short timing
code such as the above a number of times. The 'true' cycle count soon
appears.
Well, I think the best platform would be a DOS .com or a floppy bootsector.
You can disable all sources of "jitter" except a few. The dual core RDTSC
errors were supposed to be fixed by using RDTSCP instructin. However, the
AMD indicates that RDTSCP isn't completely accurate since it's affected by
power management events which causes TSC drift. And, apparently there is no
fix for Efficeon cpu's which don't throttle the TSC properly.
In your later post:
By the way, if you want to edit the code you may want to convert
spaces to tabs.
Que? No, no, not, never, ever... I use my personal code detab.c, or
detab8.c, or text.c to convert tab's to spaces. Tab's don't work
consistently across text editors and cause loss of code indentation. Most
text editors won't allow you to search for "whitespace" that contains tab's.
I hate them. For C code, excluding the spaces used for the indentation, I
prefer no spaces, or a single space. It makes searching for keywords,
operators, and syntax much easier. Think about trying to find "if(sts="
when you have ten different spacings, possibly including tab's, between the
"if" and "(sts="... Horrid!
Rod Pemberton
.
- Follow-Ups:
- Re: Fastest IA32 nops - single- and multi-byte
- From: James Harris
- Re: Fastest IA32 nops - single- and multi-byte
- References:
- Fastest IA32 nops - single- and multi-byte
- From: James Harris
- Re: Fastest IA32 nops - single- and multi-byte
- From: Wolfgang Kern
- Re: Fastest IA32 nops - single- and multi-byte
- From: James Harris
- Re: Fastest IA32 nops - single- and multi-byte
- From: Rod Pemberton
- Re: Fastest IA32 nops - single- and multi-byte
- From: James Harris
- Fastest IA32 nops - single- and multi-byte
- Prev by Date: Re: Fastest IA32 nops - single- and multi-byte
- Next by Date: Re: Fastest IA32 nops - single- and multi-byte
- Previous by thread: Re: Fastest IA32 nops - single- and multi-byte
- Next by thread: Re: Fastest IA32 nops - single- and multi-byte
- Index(es):
Relevant Pages
|