News for hackers. Stuff that matters.
Re:In what cases is Java faster than C++? by jedbrown on Wednesday February 16, 2011 @10:56AM (#2226857)

  quux_t *foo(int i) {
      /* Trick to prevent compiler from inlining */
      if(i == 0) {
          quux_t *bar = (quux_t *) malloc(sizeof(quux_t));
          return bar;
      } else {
          return foo(0);
      }
  }
Seriously? GCC removes this obfuscation at -O2, Clang does it at -O1. Check the disassembly before making stupid claims like this.
Re:In what cases is Java faster than C++? by liuliu on Wednesday February 16, 2011 @11:48AM (#2227093)
He can use __attribute__ to enforce noinline: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Though these flags are gcc specific (works in clang as well). I found it to be tremendously useful in some cases.