[tz] localtime.c issue
eggert at cs.ucla.edu
Tue Jul 9 14:30:45 UTC 2013
On 07/09/2013 07:11 AM, Ian Abbott wrote:
> However, my version is faster (for non-floating-point time_t)
> if you leave out the optimization options
True, but for system builders who care
about performance, it's safe to assume nowadays
that optimization will be enabled and the
compiler will inline the conversion function.
And those who don't care about performance won't
care a whit about the difference, except maybe
to prefer the slower version because it makes
things clearer during debugging.
Come to think of it, several macros in
the tz source code could be changed to
functions: is_digit, _, isleap, isleap_sum,
isascii, end, emalloc, erealloc, ecpyalloc,
ecatalloc. Functions tend to be easier to debug
than macros, and there's no real performance reason
to prefer macros nowadays.
More information about the tz