D speed compared to C++

Paul Findlay r.lph50+d at gmail.com
Wed Mar 19 02:51:05 PDT 2008


Saaa wrote:
>> - reduce if/else if/else || && as much as possible
> Is this because of the obvious `less calculations is better`, or something
> else?
I think chiefly this would be so the CPU's branch prediction can be more
consistent, or so it doesn't have to guess.. "The elimination of branching
is an important concern with today's deeply pipelined processor
architectures"

Check out some of the stuff on:
http://www.azillionmonkeys.com/qed/optimize.html

 - Paul




More information about the Digitalmars-d mailing list