Returning int instead of bool can actually make things _less_ efficient

Karen Lanrap karen at
Fri Dec 8 05:27:42 PST 2006

Stewart Gordon wrote:

> But when you mention "code context", do you mean that these
> expressions could be parts of larger expressions and this could
> affect what generated code is best?  Obviously optimisation
> would take this into consideration.

Yes, parts of larger expressions or even expressions that have been 
computed before for example by another core of a multi core 

> But D does have bool now.  And it would be silly if we didn't
> use it. 

Very true.

> But the D compiler generates native code.  I'm not sure how we
> can make any meaningful changes to this native code at anything
> other than compile-time.

Very correct again, and the conclusion is to deferr the current 
"compile-time" partly to the installation-time. I have already seen a 
word for such behavior but do not know the source anymore. Maybe it 
was adaptive compiling, but I am not sure. 

More information about the Digitalmars-d mailing list