Marc:
My bench/prefix-gambit.scm (admittedly perhaps modified) is
(##declare (standard-bindings) (extended-bindings) (block) (not safe) ; (not interrupts-enabled) ; (fixnum) (inlining-limit 500) ) ;... (define (run-bench name count run ok?) (let loop ((i 0) (result (list 'undefined))) (if (< i count) (loop (+ i 1) (run)) result)))
then a whole bunch of define-macros that include, e.g.,
(##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body)))
(def-macro (< x y) `(##fixnum.< ,x ,y))
The problem is that the macros don't seem to be used to expand the operations in (the earlier-occuring) run-bench, so we're measuring the inter-module call time and the generic + and < operations in addition to the times for the calls to (run).
This can be a problem when the number of iterations for a test is large enough.
Brad
Afficher les réponses par date