lkml.org 
[lkml]   [2005]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] micro optimization of cache_estimate in slab.c
Hi Steven,

On 12/18/05, Steven Rostedt <rostedt@goodmis.org> wrote:
> + do {
> + x = 1;
> + while ((x+i)*size + ALIGN(base+(x+i)*extra, align) <= wastage)
> + x <<= 1;
> + i += (x >> 1);
> + } while (x > 1);

The above is pretty hard to read. Perhaps we could give x and i better
names? Also, couldn't we move left part of the expression into a
separate static inline function for readability?

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-18 18:30    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site