Jim Meyering <[EMAIL PROTECTED]> writes:

>>                type = TYPE_U8_STRING + (8 <= flags) + (16 <= flags);
> For that one-liner, you must be playing devil's advocate or something,

I suppose I was :-).  Still, if performance is important and if we
like computing with 'int' the idea could be packaged up into an inline
function or macro that encapsulates the idea in question.  That'd be a
bit less fragile.

It is amusing to see how much nicer the generated code is, at least
with my compilers.  On one platform the tricky version saves 22% of
the instructions and compiles with zero branches instead of two.

I know, I know, this sort of thing really should go into GCC rather
than people doing this sort of tweaking by hand....


Reply via email to