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: Pádraig Brady
Subject: Re: using ASCII names to avoid overhead
Date: Sun, 13 Nov 2016 12:30:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 13/11/16 08:45, Niels Möller wrote:
> 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?

Yes mostly. 14.5K extra .text, 200 extra rodata, + other stuff.
size(1) is accumulating that to 18K extra 'text'.

> >> 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).

OK cool. I'll maybe look at adding proper_name_only_utf8()

thanks,
Pádraig



reply via email to

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