Re: [Libreoffice] rtl_alloc_cache microopt question (& patch)

2010-11-26 Thread Sebastian Spaeth
On Fri, 26 Nov 2010 13:42:29 +0100, Sebastian Spaeth wrote: > -if (n >= SAL_MAX_SIZE - (RTL_MEMALIGN + RTL_MEMALIGN - 1)) > +if (n > SAL_MAX_SIZE - 2 * RTL_MEMALIGN DOH, as all those CAP-Macros are constants anyway, the compiler would probably evaluate that to a const value on compile time

[Libreoffice] rtl_alloc_cache microopt question (& patch)

2010-11-26 Thread Sebastian Spaeth
As rtl_alloc_cache is called 600k times on writer startup I looked at it. I made the function somewhat simpler to read by removing an indention level (unfortunately making the diff harder to read), and also tried to microoptimize a tiny bit. Would the compiler be smart enough to optimize this on