Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

如果只是差10ms也就无所谓了

Posted by hawk at 2005-03-25 11:33:31
In Reply To:GetProcessTimes精度……100144*100nanoseconds Posted by:frkstyc at 2005-03-25 10:51:52
有时候系统负担重,有些比如本来需要几s的程序,就会有几百ms的差距
> 10ms左右吧,我觉得不如用QueryPerformance*那两个,算时间还方便
> 	_controlfp(PC_64, MCW_PC);
> 	static double _180 = 180.0;
> 	__asm
> 	{
> 		fldpi
> 		fdiv qword ptr [_180];
> 		mov ecx, 1090000
> 		fldz
> 	_Loop:
> 		fld st
> 		fsincos
> 		fstp qword ptr [_180]
> 		fstp qword ptr [_180]
> 		fadd st, st(1)
> 		loop _Loop
> 		fstp qword ptr [_180]
> 		fstp qword ptr [_180]
> 	}
> 这样一段程序,GPT不是0.240就是0.250,QPT是0.242和0.243。
> 而且在某些情况下,跑了2秒GPT也会返回0

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator