Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Build in gettext poison feature unconditionally

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:54:32

Nguyễn Thái Ngọc Duy wrote:
The runtime cost should be small. "gcc -O2" inlines _() and
use_gettext_poison(). But even if it does not, performance should not
be impacted as _() calls are usually not on critical path. If some of
them are, we better fix there as gettext() may or may not be cheap
anyway.
That seems reasonable to me.  The increase in code size of a commonly
inlined function and the extra "if" in a common if not
performance-critical codepath is annoying (and I'd prefer to keep
use_gettext_poison() un-inlined), but in any event the cost would go
away once the translation-based implementation of poison lands.

[...]
 I don't know the story behind this compile-time switch. The series [1]
 that introduces it does not say much.
I think it was just paranoia about performance regressions.
 This at least makes it easier for me to run poison tests instead of
 building another binary, if I remember it. Next step could be make
 "make test" run both normal and poison modes, but I'm not sure how to
 do it nicely yet.
Yes, that would be nice (or perhaps a mode to run most tests in
the current locale and rerun test assertions that use a test_i18n*
helper or C_LOCALE_OUTPUT prerequisite in the C locale).

Hope that helps,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help