News for hackers. Stuff that matters.
Re:Increasing the D Compiler Speed by Over 75% by acqq on Friday July 26, 2013 @02:12AM (#6106872)
FWIW I'd never do a CPU dependent asm code in the lex.
Re:Increasing the D Compiler Speed by Over 75% by nkurz on Friday July 26, 2013 @08:13AM (#6107746)
I played with how to phrase that. You don't need to actually use a CMOV, just write code that allows your compiler to use one if supported.

  int tmp = real;
  if (foo == bar) {
    tmp = newval;
  }
  real = tmp;
I've seen it referred to as a 'hammock'[1], and at least for GCC and ICC it usually is a strong enough hint.

[1] http://people.engr.ncsu.edu/ericro/publications/conference_M...