Re: Lazy evaluation question
Boltar said:
That's the kind of thing a good optimising compiler will already do.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Boltar said:
On 5 Jan, 16:38, Richard Heathfield <r...@see.sig.i nvalidwrote:
>
Why? If theres a zero on the LHS of a bitwise AND you know the result
will be zero no matter what is on the RHS so why bother evaluating the
RHS?
>But bitwise operators are not used to establish truth or falsity. They
>are used to calculate the result of a mathematical operation. Lazy
>evaluation would be pointless and meaningless.
>are used to calculate the result of a mathematical operation. Lazy
>evaluation would be pointless and meaningless.
Why? If theres a zero on the LHS of a bitwise AND you know the result
will be zero no matter what is on the RHS so why bother evaluating the
RHS?
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Comment