On Wed, May 18, 2011 at 1:40 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > You could assert() this: > assert(argc % (4 * sizeof(long)) == 0);
Yeah, but actually I'm not really like the idea to include asserts in the little bottleneck functions if the configuration script doesn't include -DNDEBUG in the compiler cflags by default. Because in this case it's yet additional instructions on which CPU pipeline is going to stumble upon + it also decreases the chances for this function to be inlined by the compiler. But inlining can give us an additional boost + compiler will be able to understand that, in the place where the function is inlined, it is always called with len == 512 and optimize the code for this case by automatically unroll the loop and so on. But in the bottom line I don't really mind to include the assert - just believe that it's not really worth it. -- Dmitry Konishchev mailto:konishc...@gmail.com