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B!t(BWindows2000/XP$B$rA[Dj$7$F$$$^$9!#(B


$B$b$7!">e5-$K$D$$$F$N>pJs!"$"$k$$$O>pJs85$J$I$K$D$$$F!"(B
$B$4B8CN$G$7$?$i!"$465<xD:$1$k$H$"$j$,$?$$$G$9!#(B

$B$h$m$7$/$*4j$$$7$^$9!#(B
Hiroki Kashiwazaki
2003-08-07 23:04:53 UTC
Permalink
$BGp:j!wKL3$F;$G$9!%(B

# $Be0]_Gz7b$H$$$C$?46$8$N(BNewsgroups$B;XDj$G$7$?$N$G!$(Bfj$B0J30$O:o$j$^$7$?!%(B
# $B5DO@$,B3$/$h$&$G$"$l$PE,@Z$J(BNewsgroups$B$G$*4j$$$7$^$9!%(B

At Fri, 8 Aug 2003 00:53:16 +0900,
Post by Yuuichi Akiyama
$B$=$l$O!"$J$<$J$N$G$7$g$&$+!)(B
$BHf3S$7$?OC$O<B$O$=$l$[$IJ9$$$?$3$H$,$J$+$C$?$N$G$9$,!$(BWindows98$B$G$N(B
$B%?%9%/@Z$jBX$(;~4V$,(B60ms$B$G!$$H$$$&$*OC$O0JA0FI$s$@$3$H$,$"$j$^$9!%(B

http://www.miz.nao.ac.jp/staffs/hisa/00TEsympo.html
--
$BGp:j(B $***@8(B (Hiroki Kashiwazaki)@HUIIC
Ph.D candidate in the Division of Electronics & Information
Engineering, Hokkaido University
mailto:***@cc.hokudai.ac.jp
Tel:+81-11-706-2998
IIJIMA Hiromitsu
2003-08-07 23:33:15 UTC
Permalink
$B$$$$$8$^$G$9!#(B
Post by Hiroki Kashiwazaki
# $Be0]_Gz7b$H$$$C$?46$8$N(BNewsgroups$B;XDj$G$7$?$N$G!$(Bfj$B0J30$O:o$j$^$7$?!%(B
japan.comp.windows-xp $B$OLa$7$^$7$?!#(Bmicrosoft.* $B$OB>$N%M%C%H%o!<%/$+$i$N(B
$BE~C#@-$,$h$/$J$$!J>/$J$/$H$b$&$A$+$i$O$"$s$^$jFO$+$J$$!K$N$G:o$C$?$^$^!#(B

$B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$GB,$l$k%?%$%^!<$O$D$$$F$$$^(B
$B$;$s$N$G!"5/F0;~$K$@$1(B BIOS $B$+$i;~9o$r<hF@$7$F!"$=$l0J9_$O(B OS $B$,G$0U$N@:(B
$BEY$G;~9o$r7WB,$7$^$9!#$=$N:]$K!"(BWindows $B$O!V(B1ms $BC10L$G==J,!W$HH=CG$7$?$+(B
$B$i(B 1ms $B$K$J$C$F$$$k!J<B:]!"(BWindows $B$N%7%9%F%`%3!<%k$N;~9o4X78$O(B 1ms $BC10L(B
$B$G$9!K!"(BLinux $B$d(B FreeBSD $B$G$O(B 1$B&L(Bs $B$^$G4hD%$C$F$$$k!J<B:]$K(B 1$B&L(Bs $B$,=P$k(B
$B$+$I$&$+$O(B CPU $B$NB.EY$K0MB8$9$k$G$7$g$&$1$I!K!"$H$$$&$3$H$G$O$J$$$G$7$g(B
$B$&$+!#(B

$B$A$J$_$K(B Windows $B$G$b!"(BQueryPerformanceCounter() $B$r;H$($P!"<j85$N4D6-$G$O(B
1$B&L(Bs $B0J2<$NB,Dj$,2DG=$G$9!#FbItE*$K$O(B Pentium $B0J9_$N(B CPU $B$N(B RDTSC $BL?Na$r(B
$B;H$C$F$$$k$N$G$7$g$&!#(B

========================================================================
$BHSEh(B $***@8w(B / $B$G$k$b$s$?!&$$$$$8$^(B http://www.ht.sakura.ne.jp/~delmonta/
IIJIMA Hiromitsu, aka Delmonta mailto:***@ht.sakura.ne.jp

$B(!(!(!!***@kEA![(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(B
fj.os.ms-windows.server2003 $B$^$?$O(B fj.os.ms-windows.server $B$N?***@_$N2DH](B
$B$rLd$&EjI<$r<B;\Cf$G$9!#(B
fj.news.group.comp $B$r$4;2>H$N$&$(!"$U$k$C$F$4EjI<$/$@$5$$!#(B
$BEjI<4|8B$O(B 8/25($B7n(B)$B$G$9!#(B
$B(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!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$3$l$r;}$C$F$$$J$+$C$?$+$i!"(BMS-DOS $B$N%7%9%F%`%3!<%k$G;~9o$r<h(B
$B$j9~$_$r6X;_$9$k$H<!$K%O!<%I%&%'%"$N;~7W$,%+%&%s%H%"%C%W$9$k$^$G;~7W$O;_(B
$B%-%F%/%A%c$N(B TOWNS $B$G$O%F%-%9%H2hLL$NI=<($b;_$^$k!#(B
</$BM>CL(B>
$B!y(B
$B$=$b$=$b(B AT $B8_495!$N(B BIOS $B<+BN$K$O!"(B1ms $B0J2<$GB,$l$k%?%$%^!<$O$D$$$F$$$^(B
$BEY$G;~9o$r7WB,$7$^$9!#$=$N:]$K!"(BWindows $B$O!V(B1ms $BC10L$G==J,!W$HH=CG$7$?$+(B
$B$i(B 1ms $B$K$J$C$F$$$k!J<B:]!"(BWindows $B$N%7%9%F%`%3!<%k$N;~9o4X78$O(B 1ms $BC10L(B
$B$G$9!K!"(BLinux $B$d(B FreeBSD $B$G$O(B 1$B&L(Bs $B$^$G4hD%$C$F$$$k!J<B:]$K(B 1$B&L(Bs $B$,=P$k(B
$B$+$I$&$+$O(B CPU $B$NB.EY$K0MB8$9$k$G$7$g$&$1$I!K!"$H$$$&$3$H$G$O$J$$$G$7$g(B
$B$&$+!#(B
$B$A$J$_$K(B Windows $B$G$b!"(BQueryPerformanceCounter() $B$r;H$($P!"<j85$N4D6-$G$O(B
1$B&L(Bs $B0J2<$NB,Dj$,2DG=$G$9!#FbItE*$K$O(B Pentium $B0J9_$N(B CPU $B$N(B RDTSC $BL?Na$r(B
$B;H$C$F$$$k$N$G$7$g$&!#(B
========================================================================
$B$rLd$&EjI<$r<B;\Cf$G$9!#(B
$BEjI<4|8B$O(B 8/25($B7n(B)$B$G$9!#(B
$B(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(B
NAKAMURA Kazushi
2003-08-21 11:58:05 UTC
Permalink
Post by IIJIMA Hiromitsu
Post by Hiro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free(BSD), or Die...
IIJIMA Hiromitsu
2003-08-22 11:08:35 UTC
Permalink
$B$$$$$8$^$G$9!#(B
Post by NAKAMURA Kazushi
$B;}$C$F$$$^$;$s$G$7$?!#$=$l$G(BMS-DOS$B$O!"5/F0;~$K8=;~9o!&F|IU$rI,$:F~NO$9$k(B
$B;EMM$K$J$j$^$7$?!#$=$l$KBP$7!"(BNEC-PC($B$3$s$J=qJ}$G%(%($s$+(B?)$B$NJ}$O!"(B
$B$^$7$?$,!"(BPC-9801VM21/VX21$B$+$i?7$7$$(BIC$B$K$J$j$^$7$?!#(B
$B$*$*!"$=$&$J$N$G$9$+!#;d$,$^$H$b$K(B 98DOS $B$K?($l$?$N$O(B 1993 $BG/:"$G!"$=$N(B
$B$H$-$N%^%7%s$O(B PC-9801NS $B$H$+(B PC-9821Ce $B$H$+$G$7$?$+$i!"@N$NOC$OB8$8$^$;$s(B
$B$G$7$?!#!JDL$C$F$$$?3X9;$K(B PC-9801VM $B$,$"$j$^$7$?$1$I!"$=$N8e$m$***@53N$J7?(B
$BHV$O3P$($F$$$J$$!D!K(B
Post by NAKAMURA Kazushi
(1/100s)$B$G$9!#(BNTPD$B$r0\?"$7$h$&$H$7$?$"$k?M$,65$($F$/$l$?$N$G$9$,!"(B
$B!V%G!<%b%s$,$$$/$i4hD%$C$F$b!"%G!<%b%s<+?H$rF0$+$7$F$/$l$k%?%9%/%9%$%C%A(B
$B$$$d!"7P2a;~4V$NB,Dj$O(B timeGetTime() $B$r;H$($P(B 1ms $B$G$G$-$^$9!#(B
Post by NAKAMURA Kazushi
Post by IIJIMA Hiromitsu
$B$A$J$_$K(B Windows $B$G$b!"(BQueryPerformanceCounter() $B$r;H$($P!"<j85$N4D6-$G$O(B
1$B&L(Bs $B0J2<$NB,Dj$,2DG=$G$9!#FbItE*$K$O(B Pentium $B0J9_$N(B CPU $B$N(B RDTSC $BL?Na$r(B
$B;H$C$F$$$k$N$G$7$g$&!#(B
RDTSC$BL?Na$J$i$P!"(BOS$B$K4X78L5$$$N$G(BLinux,*BSD$B$G$b;H$($^$9!#(B
$B$3$l!"%^%k%A%W%m%;%C%5$N>l9g$O$I$&$J$k$s$G$7$g$&$+!)(B
$B$D$^$j!"FCDj$N%9%l%C%I$,$"$k$H$-$O%W%m%;%C%5(B A $B$N>e$G!"JL$N$"$k$H$-$O%W%m(B
$B%;%C%5(B B $B$N>e$GF0$/$h$&$J$3$H$K$J$C$F$7$^$&$H!"(B2 $BBf$N%W%m%;%C%5$G(B RDTSC $B$N(B
$B%+%&%s%?$,F1$8CM$r<($7$F$O$$$J$$$N$G!"%f!<%6!<%i%s%I$G(B RDTSC $B$r<B9T$9$k$H(B
$B?t;z$,68$&$3$H$K$J$j$^$9!#(B

$B$H$9$k$H!"%+!<%M%k$N$"$kFCDj$NItJ,$@$1$OC10l$N%W%m%;%C%5$G<B9T$5$;$F!"(B
$B$=$3$G(B RDTSC $B$r<B9T$9$k$3$H$K$J$j$^$9!#$=$N7k2L$rMxMQ$9$k%7%9%F%`%3!<%k$,(B
$B$J$$$H%"%&%H$G$9$h$M!D9,$$!"(BLinux $B$d(B *BSD $B$K$O$"$j$^$9$,!#(B

========================================================================
$BHSEh(B $***@8w(B / $B$G$k$b$s$?!&$$$$$8$^(B http://www.ht.sakura.ne.jp/~delmonta/
IIJIMA Hiromitsu, aka Delmonta mailto:***@ht.sakura.ne.jp

$B(!(!(!!***@kEA(B/ADVERTISEMENT$B![(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(B
fj.os.ms-windows.server2003 $B$^$?$O(B fj.os.ms-windows.server $B$N?***@_$N2DH](B
$B$rLd$&EjI<$r<B;\Cf$G$9!#(B
fj.news.group.comp $B$r$4;2>H$N$&$(!"$U$k$C$F$4EjI<$/$@$5$$!#(B
$BEjI<4|8B$O(B 8/25($B7n(B)$B$G$9!#(B
$B(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(B
NAKAMURA Kazushi
2003-08-28 00:33:51 UTC
Permalink
Post by IIJIMA Hiromitsu
$B$$$d!"7P2a;~4V$NB,Dj$O(B timeGetTime() $B$r;H$($P(B 1ms $B$G$G$-$^$9!#(B
$B$=$l$O5U$G!"(BOS$BFbIt$N;~9o4IM}$O(B1ms$B$+$b$C$H:Y$+$$@:EY$G4IM}$7$F$$$k(B
$B$H;W$&$N$G$9$,!"$=$N;~9o$d!";~4V$r<hF@$7$h$&$H!"(BtimeGetTime()
$B$K8B$i$:2?$i$+$N4X?t$r8F$\$&$H$7$F$b!"<B:]$K8F$V$^$G$N4V$K(B
$B0lHL%W%m%0%i%^$K$O$$$+$s$H$b$7Fq$$%?%9%/%9%$%C%A$,F~$C$F$7$^$&(B
$B$N$G!"7k6I(B10ms$BC10L$K$J$C$F$7$^$&$H$$$&OC!#Nc$(4X?t$NJV$9CM$,(B
1ms$BC10L$G$b!"<B:]$K%W%m%0%i%`$rF0$+$7$F2?EY$bB,Dj$r7+$jJV$7$F!"(B
Post by IIJIMA Hiromitsu
$B$3$l!"%^%k%A%W%m%;%C%5$N>l9g$O$I$&$J$k$s$G$7$g$&$+!)(B
$B$3$lLLGr$$OC$G$9$M!#$A$H$d$C$F$_$^$9$+!#(B
--
$BCfB<OB;V!w?@8M(B <mailto:***@kobe1995.net>
NAKAMURA ***@KOBE <http://kobe1995.jp/>
- Be Free(BSD), or Die...
Masamichi Takatsu
2003-08-28 03:37:23 UTC
Permalink
$B9bDE(B@$B%I!<%,$G$9!#(B

$B5-;v(B <***@ns.kobe1995.net> $B$G(B
NAKAMURA Kazushi$B$5$s$O=q$-$^$7$?(B
Post by NAKAMURA Kazushi
Post by IIJIMA Hiromitsu
$B$$$d!"7P2a;~4V$NB,Dj$O(B timeGetTime() $B$r;H$($P(B 1ms $B$G$G$-$^$9!#(B
$B$K8B$i$:2?$i$+$N4X?t$r8F$\$&$H$7$F$b!"<B:]$K8F$V$^$G$N4V$K(B
$B0lHL%W%m%0%i%^$K$O$$$+$s$H$b$7Fq$$%?%9%/%9%$%C%A$,F~$C$F$7$^$&(B
$B$N$G!"7k6I(B10ms$BC10L$K$J$C$F$7$^$&$H$$$&OC!#Nc$(4X?t$NJV$9CM$,(B
1ms$BC10L$G$b!"<B:]$K%W%m%0%i%`$rF0$+$7$F2?EY$bB,Dj$r7+$jJV$7$F!"(B
$B<B:]$K$d$C$F$_$k$H$o$+$j$^$9$1$I!"(BtimeGetTime $B$G$A$c$s$H(B1ms $B$N@:EY(B
$B=P$^$9$h!#0lJ}!"(BGetTickCount $B$O@:EY$,A4A3=P$^$;$s!#(BWindows $B$N;~9o@:EY(B
$B$,0-$$$H$$$&$N$O!"(BGetTickCount $B$r;X$***@MU$@$H;W$$$^$9!#(B


$B0J2<!"%F%9%H%W%m%0%i%`(B
---
#include <stdio.h>
#include <math.h>
#include <windows.h>

int main(int argc, char *argv[])
{
LARGE_INTEGER qpc1, qpc2, qpf;
int step = (argc > 1) ? atoi(argv[1]) : 25;
int count = (argc > 2) ? atoi(argv[2]) : 10;
int i, tgt2, gtc2;
int tgt1 = timeGetTime();
int gtc1 = GetTickCount();
QueryPerformanceFrequency(&qpf);
QueryPerformanceCounter(&qpc1);
printf("QueryPerformanceCounter: %.0fHz\n", (double)qpf.QuadPart);
for (i = 0; i <= count; i++) {
int tgt, gtc;
double qpc;
if (step > 10000) {
int j;
for (j = step; j> 0; j--) {
sqrt(j);
}
} else {
Sleep(step);
}
tgt2 = timeGetTime();
gtc2 = GetTickCount();
QueryPerformanceCounter(&qpc2);
tgt = tgt2 - tgt1;
gtc = gtc2 - gtc1;
qpc = (double)(qpc2.QuadPart - qpc1.QuadPart) / (double)qpf.QuadPart * 1000.0;
tgt1 = tgt2;
gtc1 = gtc2;
qpc1 = qpc2;
if (i > 0) {
printf("timeGetTime=%dms, GetTickCount=%dms, QueryPerformanceCounter=%.3fms\n", tgt, gtc, qpc);
}
}
return 0;
}
---

$B<B9T7k2L(B(Windows XP$B!"(BAthlonXP 1800+$B!"(BBorland C++ Builder 6 $B$G%3%s%Q%$%k(B)
---
Post by NAKAMURA Kazushi
test 25
QueryPerformanceCounter: 3579545Hz
timeGetTime=26ms, GetTickCount=16ms, QueryPerformanceCounter=25.400ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.393ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.388ms
timeGetTime=26ms, GetTickCount=16ms, QueryPerformanceCounter=25.384ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.426ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.358ms
timeGetTime=26ms, GetTickCount=16ms, QueryPerformanceCounter=25.390ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.392ms
timeGetTime=26ms, GetTickCount=16ms, QueryPerformanceCounter=25.390ms
timeGetTime=25ms, GetTickCount=31ms, QueryPerformanceCounter=25.392ms


($B%k!<%WFb$G$O(B 1ms Sleep $B$9$k(B)
Post by NAKAMURA Kazushi
test 1
QueryPerformanceCounter: 3579545Hz
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.952ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.954ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.953ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.953ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.954ms
timeGetTime=2ms, GetTickCount=15ms, QueryPerformanceCounter=1.953ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.960ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.960ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=2.008ms
timeGetTime=2ms, GetTickCount=0ms, QueryPerformanceCounter=1.885ms
Post by NAKAMURA Kazushi
test 1000000
QueryPerformanceCounter: 3579545Hz
timeGetTime=37ms, GetTickCount=47ms, QueryPerformanceCounter=37.028ms
timeGetTime=37ms, GetTickCount=31ms, QueryPerformanceCounter=37.271ms
timeGetTime=37ms, GetTickCount=32ms, QueryPerformanceCounter=36.994ms
timeGetTime=37ms, GetTickCount=46ms, QueryPerformanceCounter=36.985ms
timeGetTime=37ms, GetTickCount=32ms, QueryPerformanceCounter=37.060ms
timeGetTime=37ms, GetTickCount=31ms, QueryPerformanceCounter=37.020ms
timeGetTime=37ms, GetTickCount=47ms, QueryPerformanceCounter=37.051ms
timeGetTime=37ms, GetTickCount=31ms, QueryPerformanceCounter=36.970ms
timeGetTime=38ms, GetTickCount=47ms, QueryPerformanceCounter=36.922ms
timeGetTime=41ms, GetTickCount=31ms, QueryPerformanceCounter=41.106ms
---

PROJECT TEAM $B#D#o#G#A(B $***@5F;(B ***@doga.jp
***@nifty.ne.jp
PROJECT TEAM DoGA$B$N%[!<%`%Z!<%8(B $B"*(B http://doga.jp/
8$B7n(B28$BF|(B($BLZ(B) $B:#F|$N%^!<%U%#!<$NK!B'(B [$B8&5f0w$NK!B'(B]
$B2?$r<B83$7$F$$$k$+$o$+$i$J$$$H$-$O!"<j:]$h$/<B9T$;$h!#(B

Loading...