> On 1/16/18, Don V Nielsen <[email protected]> wrote:
> > Off topic question regarding fix: "0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW)"
> >
> > Is there a performance bonus or compiler optimization if one compares a
> > target constant to a source condition versus comparing a target condition
> > to a source constant, as in "(wctrlFlags & WHERE_ONEPASS_MULTIROW)!=0"?
>
> Without actually checking, I'm guessing that both forms generating
> identical machine code. The difference is purely a stylistic thing.
The difference is when the operator is == and you make a typo, i.e. == vs =.
0 = foo from 0 == foo
vs foo = 0 from foo == 0
The first becomes a quickly fixed syntax error, the second an
assignment, a not so easily seen bug.
--
See you,
Andreas Kupries <[email protected]>
<http://core.tcl.tk/akupries/>
Developer @ SUSE (MicroFocus Canada LLC)
<[email protected]>
-------------------------------------------------------------------------------
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users