[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prepare vasnprintf for Unicode strings
From: |
Paul Eggert |
Subject: |
Re: prepare vasnprintf for Unicode strings |
Date: |
Tue, 12 Jun 2007 15:14:18 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> 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....
Re: prepare vasnprintf for Unicode strings, Daniel Jacobowitz, 2007/06/11