それぞれ,500,000 回呼出した時間 (m sec)
| P4 | VirtualPC | Xeon | |
| CCriticalSection | 734 | 160 | 94 |
| *1 | 78 | 20 | 15 |
| CMutex | 8200 | 710 | 1140 |
| *1 | 950 | 250 | 437 |
| Profile INI | 2900 | 950 | 920 |
| Reg | 2100 | 570 | 740 |
ElapseTick et_cs ;
{
CCriticalSection cs ;
for (int index=0 ; index<500000 ; index++) {
//CCriticalSection cs ;
cs.Lock() ;
cs.Unlock() ;
}
}
DWORD e_cs = et_cs.GetElapse() ;
ElapseTick et_me ;
{
CMutex mt ;
for (int index=0 ; index<500000 ; index++) {
mt.Lock() ;
mt.Unlock() ;
}
}
DWORD e_me = et_me.GetElapse() ;
ElapseTick et_pr ;
{
Profile profile ;
for (int index=0 ; index<500000 ; index++) {
int data = profile.GetInt(_T("Test"),_T("Test"),100) ;
}
}
DWORD e_pr = et_pr.GetElapse() ;