zdump -v factor-of-2 speedup on 64-bit hosts (-500 -> 1800)

Olson, Arthur David (NIH/NCI) [E] olsona at dc37a.nci.nih.gov
Thu Feb 23 17:59:09 UTC 2006


While standard time wasn't introduced before 1800 anywhere, there are
earlier time oddities (such as swiches from the Julian to the Gregorian
calendar, switches to the Julian calendar, skipping of the year zero,
and leap year gyrations). While the current time zone package doesn't
try to handle these oddities, other packages might. Since zdump is
supposed to be independent of the rest of the time zone package, the
built-in limits of -500 and 2500 are designed to run from earliest
at-all-likely-to-be-reflected oddity to the present day (with a couple
of hundred years of slop at either end).

It's always possible, of course, to...
	zdump -v -c1800,2500 US/Pacific
...to get the desired effect.

				--ado

-----Original Message-----
From: Paul Eggert [mailto:eggert at cs.ucla.edu] 
Sent: Thursday, February 23, 2006 12:39 PM
To: tz at lecserver.nci.nih.gov
Subject: zdump -v factor-of-2 speedup on 64-bit hosts (-500 -> 1800)

The command "zdump -v US/Pacific" took 36 CPU seconds on my (admittedly
aging) 440 MHz UltraSPARC-IIi machine.  There are no doubt other
speedups that could be done, but the following obvious one shrank the
CPU time to 20 CPU seconds.  Standard time wasn't introduced before 1800
anywhere that I know of.

--- zdump.8	2006/02/20 15:08:17	2006.2
+++ zdump.8	2006/02/23 17:29:26	2006.2.0.1
@@ -41,7 +41,7 @@ otherwise.
 .BI "\-c " [loyear,]hiyear
 Cut off verbose output near the start of the given year(s).
 By default,
-the program cuts off verbose output near the starts of the years -500
and 2500.
+the program cuts off verbose output near the starts of the years 1800
and 2500.
 .SH LIMITATIONS
 The
 .B \-v
--- zdump.c	2006/02/21 21:07:30	2006.2.0.1
+++ zdump.c	2006/02/23 17:29:26	2006.2.0.2
@@ -18,7 +18,7 @@ static char	elsieid[] = "@(#)zdump.c	8.1
 #endif /* !defined isascii */
 
 #ifndef ZDUMP_LO_YEAR
-#define ZDUMP_LO_YEAR	(-500)
+#define ZDUMP_LO_YEAR	1800
 #endif /* !defined ZDUMP_LO_YEAR */
 
 #ifndef ZDUMP_HI_YEAR




More information about the tz mailing list