[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] date comparison is very, very, very slow (srfi-19)

From: Anthony Carrico
Subject: Re: [Chicken-users] date comparison is very, very, very slow (srfi-19)
Date: Thu, 25 Sep 2008 20:28:05 -0400
User-agent: Mozilla-Thunderbird (X11/20080509)

> 3) For some reason SRFI-19 uses the numbers egg - did you
> look at the output of date->julian-day?  It's an exact
> rational in the number of nanoseconds, and the date
> conversion performs a *lot* of numerical computations.

This is the real problem here. I copied enough of the srfi-19 code into
my test to get date->julian-day. I ran it with and without numbers:

With (require-extension numbers):

$ csc date-test.scm
$ ./date-test
  16.145 seconds elapsed
  15.745 seconds in (major) GC
    8000 mutations
       0 minor GCs
    7645 major GCs


$ csc date-test.scm
$ ./date-test
   0.044 seconds elapsed
   0.008 seconds in (major) GC
    2000 mutations
      37 minor GCs
       3 major GCs

Wow! Obviously the record accessors aren't a significant problem here.

Is there something wrong with numbers?  Are rationals it really that
slow? Again almost all the time is spent in major GC. Why? Note that I'm
pretty new to Chicken.

Anthony Carrico

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]