
10 Sep
2009
10 Sep
'09
5:48 p.m.
well, depending on your compiler optimization and cpu architecture, the compiler is able to optimize it, removing the branch ... e.g. different revisions of sse provide opcodes for min/max of floats/doubles and different kinds of integers ... in those cases, your branchless code may be even slower, unless it isn't optimized to use these instructions as well :) i could not get rid of a jump with msvc80 maybe other compiler can do it (tell me if you find out) i looked at what sseX can offer but unfortunately it isn't portable besides AFAIK all modern cpus have pipeline (at least 2 stages) so you
on 10.09.2009 at 21:31 Tim Blechmann wrote : probably will not miss if you count on it -- Pavel