[PATCH] time: Avoid alignment gaps in __tzfile_read
Florian Weimer
fweimer@redhat.com
Sun Feb 3 08:29:00 GMT 2019
* Paul Eggert:
> Florian Weimer wrote:
>> By ordering the suballocations by decreasing alignment, alignment
>> gaps can be avoided.
>>
>> ... In the 8-byte case, two reads are now needed because the
>> transitions and type indexes are no longer adjacent.
>
> Is the idea to slightly decrease the amount of memory used, at the
> expense of a slight increase in CPU time because of the two fread
> calls?
Essentially yes.
> If so, I don't see the benefit of the change; usually we'd
> rather save CPU time even if a bit more memory is used.
It also simplifies the code because it removes one of the cases that
depends on trans_width.
Thanks,
Florian
More information about the Libc-alpha
mailing list