75% speedup for zdump on 64-bit Solaris sparc

Ken Pizzini tz. at explicate.org
Tue Mar 7 21:27:03 UTC 2006

On Fri, Feb 24, 2006 at 01:28:43PM -0800, Paul Eggert wrote:
> Though this is a win, I'm a bit puzzled by why sp->timecnt was so
> large for "America/Los_Angeles".  sp->timecnt was 1200, but
> America/Los_Angeles contains nowhere near 1200 transitions.  There
> might be an even bigger performance win if the number of transitions
> were shrunk in memory, down to the minimum number needed to represent
> the data.

The US/Pacific zone file itself does not explicitly contain all
these transitions, because it holds most of them them implicitly
in its final entry of PST8PDT,M3.2.0,M11.1.0 (and tzparse() fills
the tail of the sp->*[] entries based on this).

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)

And the zdump output only has 1110 transitions because it gets cut off at:
  3) ZDUMP_HI_YEAR = 2500 (zdump.c)

		--Ken Pizzini

More information about the tz mailing list