From: Tom St Denis Newsgroups: comp.os.msdos.djgpp Subject: Re: Reading MSR (Athlon multiplier) Date: Fri, 19 Jan 2001 03:42:44 GMT Organization: Deja.com Lines: 80 Message-ID: <948d3i$gne$1@nnrp1.deja.com> References: <3a66161d DOT 226362160 AT news DOT sci DOT fi> <945a90$ckgq1$1 AT ID-57378 DOT news DOT dfncis DOT de> <945itn$3ai$1 AT nnrp1 DOT deja DOT com> <945mn8$cjroo$1 AT ID-57378 DOT news DOT dfncis DOT de> <946ofe$vlp$1 AT nnrp1 DOT deja DOT com> <946rg8$c61d6$1 AT ID-57378 DOT news DOT dfncis DOT de> <9471af$7r4$1 AT nnrp1 DOT deja DOT com> <947ao2$ca654$1 AT ID-57378 DOT news DOT dfncis DOT de> <947p8h$vij$1 AT nnrp1 DOT deja DOT com> <947rdf$ct4h3$1 AT ID-57378 DOT news DOT dfncis DOT de> NNTP-Posting-Host: 24.156.37.224 X-Article-Creation-Date: Fri Jan 19 03:42:44 2001 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01 [en] X-Http-Proxy: 1.1 x58.deja.com:80 (Squid/1.1.22) for client 24.156.37.224 X-MyDeja-Info: XMYDJUIDtomstdenis To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <947rdf$ct4h3$1 AT ID-57378 DOT news DOT dfncis DOT de>, "Alexei A. Frounze" wrote: > "Tom St Denis" 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" 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/