Re: 3.0.3

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
 
> FWIW I prefer this, which I got from someone on this forum:
> }}}
<eucode>
> constant TRUE=(1=1),  -- for Eu, 1 (aka <>0)
>          FALSE=(1=0)  -- for Eu, 0
> </eucode>
{{{

> It is succinct and programming-language-independent.

LOL ...  thank you. Yes, this is the way I code in win32lib.
 
> > Also due to a quirk in the way that short-circuit IF evaluations work

> Crikey! I really (really!) thought that
if integer(x) and (x=FALSE or x=TRUE) then return TRUE end if
     return FALSE

> would be faster, but you are right and in my first test some 35% faster.
> I thought I understood this, what is this "quirk" am I missing?

It was brought to my attention some time ago during that programming contest I
ran for you guys. I haven't looked into the generated code for it but I guess
that it's not as efficient as it could be. In fact, I'm not sure that there are
any optmizations done to the code after it has been generated. Maybe this is an
openning for a future enhancement?

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu