On Sat, May 29, 1999 at 10:36:09AM -0700, Ken Krugler wrote:
> Jason,
>
> >Is there any particular reason this function takes @270 ticks to execute?
>
> 270 ticks on the device = 2.7 seconds, which doesn't sound right. I'm guessing
>something caused a problem with profiling.
>
> The DateToDays routine does take longer than I expected because it's got a long
>multiply, a regular multiply, a regular divide, and up to 11 calls (via traps) to the
>DaysInMonth routine.
>
> Multiplication & division are really slow on a 68K processor, plus trap dispatching
>(because it's initiated by an exception) is also no speed demon. Still, there's no
>way it's anything close to 2+ seconds per call.
Well, also be sure that you are sending it the date in the proper
format. In my experience the call has taken much longer than 2.7
seconds when I've accidentally sent it bogus dates, such as year 0
or a DateType with the year field as 1999 instead of 1999 - 1904.
--frank