On Fri, May 17, 2013 at 10:21:43AM +0200, Antonio Quartulli wrote:
> When comparing a network ordered value with a constant, it
> is better to convert the constant at compile time by means
> of __constant_htons() instead of converting the value at
> runtime using ntohs().
> 
> This refactoring may slightly improve the code performance.
> 
> Signed-off-by: Antonio Quartulli <[email protected]>

After discussing with Simon, we realised that using __constant_htons is useless
since htons is smart enough to be as efficient as his brother __constant*.

Therefore this patch will be re-arranged to use htons only.
It will still remove some ntohs and make use of htons at their place.


Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachment: signature.asc
Description: Digital signature

Reply via email to