Make tabulation script more resilient to incorrect input.

This commit is contained in:
Vincent St-Amour 2011-04-27 17:03:59 -04:00
parent e11582a522
commit 7cf64050f8

View File

@ -99,7 +99,8 @@ exec racket -qu "$0" ${1+"$@"}
#f)])
(if a
;; compute cpu, real and gc average time for the nothing benchmark
(let ([nothing-runs (map car a)])
(let ([nothing-runs (map (lambda (x) (map (lambda (y) (or y 0)) x))
(map car a))])
(map (lambda (x) (exact->inexact (/ x (length nothing-runs))))
(foldl (lambda (x y) (map + x y))
'(0 0 0)