DateTime's and LargeIntegers
RossBoylan at stanfordalumni.org
Tue Jun 29 01:10:06 UTC 2004
I'm looking for ways to speed up my application, which has gotten
intolerably slow. It spends a lot of its time doing operations on
DateAndTime objects, which are basically Brent Pinkney's
implementation of the ANSI standard for squeak. However, I see he has
made some changes since the version I got. See
I notice that this class doesn't seem to have made it into the
mainline image (3.6), though there is a TimeStamp class there. Aside
from the fact that it has a different vocabulary, it doesn't have any
associated concept of durations (e.g., a week), which I also need.
There is at least one obvious functional difference: DateAndTime knows
its offset from UTC, while TimeStamp doesn't. Not a must have feature
(However, I see some Mar 2004 messages with fixes, that sort of give
the impression it is in the main update stream...?)
My first question is if anyone could fill me in on the history of
Date/Times and Durations in the image. I recall a couple of years ago
there was some discussion of this, but I don't know how it turned out.
In particular, there are issues of functionality, ANSI compatibility,
and, as I've just discovered, speed. (DateAndTime generally converts
stuff to a large integer and then operates; TimeStamp does not, at
least in the < operator, which is eating a lot of my time).
I also recall there was another change set being bandied about that
introduced ANSI compatibility into the image. That had a different
Date/Time implementation. Details at
Second, I see some discussion of LargeInteger plugins. That might
make my operations go much faster. Are those builtin by default? I
don't see anything in /usr/lib/squeak, even for the 3.6 Debianized vm
that I got, I think, from Ned Konz. Would such a plugin help? How do
I get or build it? How do I know if I'm already using it?
To give you a sense of why I care, here are some timings in the
profiler as I add a single task to my tasklist:
The first column is time in seconds (not ms)
That's a total of 68% of total execution time right there.
Overall, the operations spends
64% of its time in the main morphic loop, within which
19% operations on DateAndTime or Durations
36% evaluating a sort block, within which
35% (i.e., almost all) operations on DateAndTime
Obviously, waiting over a minute to add a task is far from user
friendly! (Athlon 800Mhz).
There is also the possibility of making it do fewer of these
operations to begin with, but if there's a quick way to get a speed up
that would be great.
More information about the Squeak-dev