Re: likely keyword for D?

2011-03-23 Thread Peter Alexander
On 23/03/11 4:59 AM, %u wrote: I just thought of a (crazy) idea: Should D implement a likely keyword for if statements? Something like: if likely (x == 2) { //do something } This would allow the compiler to generate branch prediction code for the program, allowing the programmer

Re: likely keyword for D?

2011-03-23 Thread Don
Peter Alexander wrote: On 23/03/11 4:59 AM, %u wrote: I just thought of a (crazy) idea: Should D implement a likely keyword for if statements? Something like: if likely (x == 2) { //do something } This would allow the compiler to generate branch prediction code for the program, allowing

likely keyword for D?

2011-03-22 Thread %u
I just thought of a (crazy) idea: Should D implement a likely keyword for if statements? Something like: if likely (x == 2) { //do something } This would allow the compiler to generate branch prediction code for the program, allowing the programmer to prevent branch predictions. It's

Re: likely keyword for D?

2011-03-22 Thread Andrej Mitrovic
That will be a special feature available only in DMD Quantum EditionĀ®.