[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/hpet: simplify hpet_get_channel()



>>> On 23.03.12 at 14:52, Keir Fraser <keir@xxxxxxx> wrote:
> On 23/03/2012 10:46, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
> 
>>> Why is the following for-loop changed into do-while? It looks like it just
>>> makes the code longer, especially as you replace a % operator with
>>> open-coded equivalent for no reason I can see.
>> 
>> Simply because
>> 
>>     for ( i = next; i != next; ++i )
>> 
>> makes no sense.
>> 
>> Removing the % is an efficiency thing - the resulting code is not only
>> faster, but also smaller (presumably because of the special register
>> limitations div has).
> 
> Does that matter? It's the last thing done before going into deep sleep.
> 
> I suppose I don't mind that much, the whole thing just seems to make the C
> code longer.

Okay, let's forget about it then. (I could certainly make the code
shorter using a few comma expressions, but I don't think you'd
like that any better.)

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.