|
Message-ID: <20060502182526.GA9672@openwall.com> Date: Tue, 2 May 2006 22:25:26 +0400 From: Solar Designer <solar@...nwall.com> To: john-users@...ts.openwall.com Subject: Re: MinGW build On Tue, May 02, 2006 at 08:04:14PM +0200, Michal Luczaj wrote: > "The times function returns information about a process' consumption of > processor time in a struct tms object, _in addition_ to the process' CPU > time." > > As stated above: processor time is stored in a struct while process' CPU > time is a return value of function. Does it make sense now? No. times() is supposed to be returning CPU times in the struct, but real time (in ticks since an arbitrary point in the past) as the function's return value. That's what POSIX says and that's the way I've been successfully using the function for years. > >> What is more, after running --test, it seemed that everything was fine: > >> Benchmarking: Traditional DES [64/64 BS MMX]... DONE > >> Many salts: 593832 c/s real, 596535 c/s virtual > >> Only one salt: 538966 c/s real, 548912 c/s virtual > > Yes, this does look realistic. Can you please try running two instances > > simultaneously to see how the numbers will change? > > Here we go... > > Many salts: 280809 c/s real, 284930 c/s virtual > Only one salt: 261091 c/s real, 266839 c/s virtual > > Many salts: 293709 c/s real, 301609 c/s virtual > Only one salt: 256117 c/s real, 264183 c/s virtual Well, this suggests that your fake-times() returns almost-real times in place of both real and CPU times. It also suggests that clock() on MinGW is not standards-compliant, returning real rather than CPU time. The correct output would be around 300k c/s real, 600k c/s virtual. -- Alexander Peslyak <solar at openwall.com> GPG key ID: B35D3598 fp: 6429 0D7E F130 C13E C929 6447 73C3 A290 B35D 3598 http://www.openwall.com - bringing security into open computing environments
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.