Messages in this thread | | | Date | Sun, 18 Dec 2005 19:27:38 +0200 | From | Pekka Enberg <> | Subject | Re: [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/
| |