[gambit-list] You should specialize (make-vector n x) when n is known at compile-time

Bradley Lucier lucier at math.purdue.edu
Tue Jun 28 16:25:02 EDT 2005


Marc:

I took the gcbench.sch file from Clinger, changed

     (let-class (((make-empty-node) (make-vector 4 0))

to
     (let-class (((make-empty-node) (vector 0 0 0 0))

and the run time went from

(time (gc-benchmark))
     4834 ms real time
     4679 ms cpu time (4619 user, 60 system)
     38 collections accounting for 1519 ms real time (1465 user, 9  
system)
     1247819792 bytes allocated
     22074 minor faults
     no major faults

to

(time (gc-benchmark))
     3110 ms real time
     2981 ms cpu time (2902 user, 79 system)
     57 collections accounting for 1443 ms real time (1374 user, 16  
system)
     1247692592 bytes allocated
     17367 minor faults
     no major faults

on a 64-bit gambc40b13 on Opteron.

This should be done by the compiler.

Brad



More information about the Gambit-list mailing list