On Sat, 13 Dec 2008, Joerg Sonnenberger wrote:

> On Sat, Dec 13, 2008 at 07:52:52PM +0100, Vincent Torri wrote:
>>> +   milli_sec = (int)GetTickCount() - _evil_time_millisecond;
>>> +   tp->tv_sec = _evil_time_second + milli_sec / 1000;
>>> +   tp->tv_usec = (milli_sec % 1000) * 1000;
>>
>> would it be better that I write the following:
> [snap branched version]
>
> Unlikely. On most modern CPUs a branch is as expensive as a
> division, so unless the first case is almost exclusively hit, it will
> not help much.

Well, maybe you don't know, but the mingw32ce compiler is for the Windows 
CE port. So the processors are usually arm type ones (like the Intel 
XScale ones). Also there is a dicision and a modulo operations.

Anyway, it's good to know that for modern processors.

Vincent

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to