felix winkelmann wrote:
> An overhaul of the compiler is definitely on the agenda. Unfortunately
> this needs time and manpower.

You guys probably have good intuition, but also it would be nice to
extend profiling down into the date library before jumping to any
conclusions. BTW Felix, thanks for the timing and profiling options
built into Chicken, which I used to get this far.

A slot-by-slot comparison (as suggested above) speeds up my program by
two orders of magnitude. Good enough for me, for now. Thanks to everyone.

This problem has got me scanning the Chicken mailing list more closely
than I have for a long time. The hygienic work you guys are doing sounds
pretty interesting.

(define date<?-fast
  (lambda (x y)
    (if (= (date-zone-offset x) (date-zone-offset y))
        (or
         (< (date-year x) (date-year y))
         (and
          (= (date-year x) (date-year y))
          (or
           (< (date-month x) (date-month y))
           (and
            (= (date-month x) (date-month y))
            (or
             (< (date-day x) (date-day y))
             (and
              (= (date-day x) (date-day y))
              (or
               (< (date-hour x) (date-hour y))
               (and
                (= (date-hour x) (date-hour y))
                (or
                 (< (date-minute x) (date-minute y))
                 (and
                  (= (date-minute x) (date-minute y))
                  (or
                   (< (date-second x) (date-second y))
                   (and
                    (= (date-second x) (date-second y))
                    (< (date-nanosecond x) (date-nanosecond y))))))))))))))
        (error "date<?-fast needs zone offset support"))))

-- 
Anthony Carrico
http://memebeam.org/acarrico/

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to