lkml.org 
[lkml]   [2010]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/3] ipc: use shifts to extract seq/idx
On 05/20/2010 09:00 AM, Nick Piggin wrote:
> All the ipc ids and sequences are signed integers, so power of 2
> sequence multiplier does not work so well. Convert it to use shifts,
> which improves generated code particularly in ipc_lock/ipc_lock_check
> fast paths.
>
>
Have you checked the asm output?
I would expect that gcc auto-optimizes constant divides by power-of-two.

--
Manfred


\
 
 \ /
  Last update: 2010-05-20 20:17    [from the cache]
©2003-2011 Jasper Spaans