Whenever I see C code like this:<p><pre><code> #define CHUNK(multiplier, z) \
{ \
uint64 old_a = a; \
a = Rotate(b, 41 ^ z) * multiplier + Fetch64(s); \
b = Rotate(c, 27 ^ z) * multiplier + Fetch64(s + 8); \
c = Rotate(d, 41 ^ z) * multiplier + Fetch64(s + 16); \
... etc
</code></pre>
I wonder: isn't this the kind of thing that's better handled by creating a function, and <i>maybe</i> explicitly telling the compiler to inline it? I mean, you can do this (from here: <a href="http://gcc.gnu.org/onlinedocs/gcc/Inline.html" rel="nofollow">http://gcc.gnu.org/onlinedocs/gcc/Inline.html</a> ):<p><pre><code> inline void foo (const char) __attribute__((always_inline));
</code></pre>
or you could simply let your optimizer take care of it. It may be faster to <i>not</i> inline it in some circumstances, but you've <i>gone out of your way</i> to prevent it from being able to make that decision, and to make your code harder to read and more prone to problems due to macro expansion.<p>Why? Is it habit? Or is there a good reason? (currently. historical reasons are not good reasons to continue doing things.)