75% speedup for zdump on 64-bit Solaris sparc

Paul Eggert eggert at CS.UCLA.EDU
Wed Mar 8 09:14:29 UTC 2006


Ken Pizzini <tz. at explicate.org> writes:

> So the reason it has 1200 is:
>   1) two transitions per year from here to eternity (PST8PDT,M3.2.0,M11.1.0)
>   2) TZ_MAX_TIMES  = 1200 (tzfile.h)

OK, I guess, but why store more than 800 transitions into the future?
That's enough for 400 years, which is all that's needed, right?

Admittedly this wouldn't save all that much, once you go to a binary
search.  (I haven't yet had time to benchmark ado's latest cache patch
against a binary search on my host.)

Wait a minute.  Is 400 years enough?  The number of days in 400
Gregorian years is not divisible by 7, but daylight-saving transitions
are commonly dependent on the day of the week.  So shouldn't we need
2800 years' worth of transitions in general, or 5600 transitions
total?

(Sorry, as you can probably tell, I don't really understand the
current implementation approach.)



More information about the tz mailing list