Mail Archives: djgpp/2001/01/18/23:52:35
In article <947rdf$ct4h3$1 AT ID-57378 DOT news DOT dfncis DOT de>,
"Alexei A. Frounze" <dummy_addressee AT hotmail DOT com> wrote:
> "Tom St Denis" <stdenis AT compmore DOT net> wrote in message
> news:947p8h$vij$1 AT nnrp1 DOT deja DOT com...
> > In article <947ao2$ca654$1 AT ID-57378 DOT news DOT dfncis DOT de>,
> > "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com> wrote:
> > > oh man, you're not understanding the issue at all. do you?
> > > okay, you suuggest that I use the following code in order to compute the
> > > overhead involved by "push eax/edx":
> >
> > Sorry I though you were just summing the rdtsc counts then dividing out to
> > get an average...
>
> 1st I find difference between consequtive RDTSCs. I calculate 16 such
> differencies and find the average. It's not about summation, it's about
> subtraction.
>
> > You're code is wrong anyways, so if you want to be a meany get your code
> > right first!
>
> Nope. It's right, your argument is wrong!
> Okay, let me explain once more...
> Let's take a look at the source:
> -------8<-------
> mov ch, 17 ; 17 values for average of 16 periods
> l0:
> mov ax, [es:6ch]
> l1:
> cmp ax, [es:6ch]
> je l1
> rdtsc
> push edx
> push eax
> dec ch
> jnz l0
> -------8<-------
> you claim that those pushes and everything after rdtsc involves overhead
> which should be fixed by adding a certain small value to the result of
> RDTSC, right?
> hold on...
>
> okay, i get those 17 values from RDTSC:
>
> delay
> n1 = RDTSC
> delay
> n2 = RDTSC
> delay
> n3 = RDTSC
> ...
> delay
> n17 = RDTSC
>
> then I evaluate differencies of those n's:
> d1 = n17 - n16
> d2 = n16 - n15
> d3 = n15 - n14
> ...
> d16 = n2 - n1
>
> NOW! if you propose me to add a certain constant to each n (n1...n17) (let's
> say) 10, I end up with:
>
> d1 = n17 + 10 - (n16 +10) = n17 - n16
> d2 = n16 + 10 - (n15 +10) = n16 - n15
> d3 = n15 + 10 - (n14 +10) = n15 - n14
> ...
> d16 = n2 + 10 - (n1 +10) = n2 - n1
>
> which is the same stuff.
> NOW, DO YOU STILL DISAGREE AND CLAIM THAT MY CODE IS WRONG???
Hmm loser: I don't have a 807mhz processor. Your code is wrong. A program
that says 1+1=3 is wrong despite being coded flawlessly in perfect ANSI C.
Tom
Sent via Deja.com
http://www.deja.com/
- Raw text -