No subject

From: ()
Date: Fri Jul 13 09:02:16 EDT 2012

seem to be overhead of internal port wrappings that facilitate line
counting. I have some ideas on how to improve that, but not yet an idea
that I like.

About 0.3 seconds of the difference has to do with handling transparent
structures, probably due to the use of `struct->vector' instead of more
direct handling of structure elements. If the other overhead can be
reduced, that might be worth a closer look.

The rest of the difference appears to be due to miscellaneous small
inefficiencies.

----------------------------------------

#lang racket

(struct s (a b c d e f) #:transparent)

(define v (for/vector ([i 20000])
            (s 1 20 300 4000 '("a" "b") '("c" "d" "e"))))

(define (go print)
  (time (with-output-to-file "/tmp/o"
          #:exists 'truncate
          (lambda ()
            (print v)))))

(go write)
(go display)
(go print)
(parameterize ([pretty-print-columns 'infinity])
  (go pretty-print))
(go pretty-print)


Posted on the users mailing list.