coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using ASCII names to avoid overhead


From: Niels Möller
Subject: Re: using ASCII names to avoid overhead
Date: Sun, 13 Nov 2016 09:45:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)

Pádraig Brady <address@hidden> writes:

> I was just looking at the overhead of proper_name_utf8() vs proper_name()
> in coreutils, and noticed that using the former adds about 18K to each
> program.

And that's code, not rodata?

> For example truncate(1) is 62K with and 44K without.
> I'm going to simplify usages for my name at least.
> I don't care and anyway no one can pronounce it no matter which form is used 
> :)
> I was wondering if you preferred to keep utf8 usage for your names?
> These names are seen in `cat --version` output etc.

I guess only factor --version is affected in my case, while Torbjörn has
been involved in more parts of coreutils.

I'd prefer to keep the dots on my name at least for display in utf8
locales, and preferably (but less important) also in latin1 locales.

I understand you want to reduce the overhead, but maybe there's some other
way to do it? E.g, 

* Produce utf8 and ascii versions of the names, or the complete
  --version message, at compile time, and display one of the versions
  depending on the locale? Should be < 1K overhead. Possibly also
  support utf8 -> latin1 conversion, which is cheap provided the utf-8
  text uses precomposed characters, and likely to fit within 1K overhead
  (but maybe not worth the effort given that the latin1 world is mostly
  migrated to utf8 by now).

* Spawn GNU recode or iconv as an external process on demand, only when
  conversion is needed?

Regards,
/Niels


-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]