"J.C. Pizarro" <[EMAIL PROTECTED]> writes: > To optimize even more the x86, it still has to use: > 1. Use imul instead of mul because it's little bit faster in cycles. > 2. Use jns/js (sign's conditional jump) instead of jnc/jc (carry's > conditional jump). > 3. To modify the C-preprocessor and/or C/C++ compiler for: > #if argument X is a constant then > use this code specific of constant X > #else if argument Y is not a constant then > use this code specific of non-constant Y > #else > use this general code > #else > > The 3rd option is too complex but powerful like nearly Turing machine ;)
I think you may be looking at this at the wrong level. If we implement this (I don't care one way or the other, myself), it would be done by having the C++ frontend generate the appropriate GENERIC code before the call to operator new[]. Issues like imul vs. mul, or constant folding, are irrelevant at that level. Ian