From 9632e190328296b607da52084611ee57eba36a7c Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Tue, 6 Nov 2007 01:14:27 -0500 Subject: [PATCH] Fixes bug 160395: missing import from r6r script reports bogus error. --- benchmarks/benchall.ss | 2 +- benchmarks/rnrs-benchmarks.ss | 2 +- benchmarks/summarize.pl | 17 ++++-- benchmarks/timelog | 100 ++++++++++++++++++++++++++++++++++ scheme/psyntax.expander.ss | 7 ++- 5 files changed, 121 insertions(+), 7 deletions(-) diff --git a/benchmarks/benchall.ss b/benchmarks/benchall.ss index 4de5850..e28631a 100755 --- a/benchmarks/benchall.ss +++ b/benchmarks/benchall.ss @@ -5,7 +5,7 @@ (define all-benchmarks '(ack array1 boyer browse cat compiler conform cpstak ctak dderiv deriv destruc diviter divrec dynamic earley fft fib fibc fibfp - fpsum gcbench gcold graphs lattice matrix maze mazefun mbro + fpsum gcbench gcold graphs lattice matrix maze mazefun mbrot nbody nboyer nqueens ntakl nucleic paraffins parsing perm9 peval pi pnpoly primes puzzle quicksort ray sboyer scheme simplex slatex string sum sum1 sumfp sumloop tail tak takl trav1 trav2 diff --git a/benchmarks/rnrs-benchmarks.ss b/benchmarks/rnrs-benchmarks.ss index 42b4286..2659b47 100644 --- a/benchmarks/rnrs-benchmarks.ss +++ b/benchmarks/rnrs-benchmarks.ss @@ -139,7 +139,7 @@ (define fft-iters 4000) (define fib-iters 6) (define fibfp-iters 2) - (define mbrot-iters 100) + (define mbrot-iters 120) (define nucleic-iters 12) (define pnpoly-iters 140000) (define sum-iters 30000) diff --git a/benchmarks/summarize.pl b/benchmarks/summarize.pl index ee7345d..fdea5dc 100755 --- a/benchmarks/summarize.pl +++ b/benchmarks/summarize.pl @@ -56,14 +56,23 @@ my %gctimes; my @times = sort { $times{$a} <=> $times{$b} } keys %times; my @benchmarks = sort { $benchmarks{$a} <=> $benchmarks{$b} } keys %benchmarks; +my $verbose = 0; + foreach my $bench (@benchmarks){ print "benchmark: $bench\n"; + my $prev = 0; foreach my $time (@times){ my @times = @{$runtimes{$bench}{$time}}; - printf " %6d %6s %6s on $time\n", - average(@times), - min(@times), - max(@times); + my $avg = average(@times); + if($prev){ + my $diff = (($avg - $prev) / $prev) * 100; + printf " %6d %6s on $time\n", + $avg, + sprintf("(%s%d%%)", ($diff>0) ? "+" : ($diff<0) ? "-" : "", abs $diff); + } else { + printf " %6d on $time\n", $avg; + } + $prev = $avg; } } diff --git a/benchmarks/timelog b/benchmarks/timelog index e31ea8a..084e8c0 100644 --- a/benchmarks/timelog +++ b/benchmarks/timelog @@ -1719,6 +1719,56 @@ running stats for mazefun (2500): 2197 ms elapsed cpu time, including 75 ms collecting 2198 ms elapsed real time, including 76 ms collecting 425212336 bytes allocated +running stats for compile-mbrot: + 1 collection + 63 ms elapsed cpu time, including 40 ms collecting + 63 ms elapsed real time, including 40 ms collecting + 2163176 bytes allocated +running stats for mbrot (120): + 635 collections + 2218 ms elapsed cpu time, including 243 ms collecting + 2221 ms elapsed real time, including 246 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 61 ms elapsed cpu time, including 39 ms collecting + 62 ms elapsed real time, including 39 ms collecting + 2163176 bytes allocated +running stats for mbrot (120): + 635 collections + 2202 ms elapsed cpu time, including 240 ms collecting + 2205 ms elapsed real time, including 242 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 62 ms elapsed cpu time, including 39 ms collecting + 62 ms elapsed real time, including 39 ms collecting + 2163176 bytes allocated +running stats for mbrot (120): + 635 collections + 2223 ms elapsed cpu time, including 241 ms collecting + 2225 ms elapsed real time, including 244 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 61 ms elapsed cpu time, including 38 ms collecting + 62 ms elapsed real time, including 39 ms collecting + 2163176 bytes allocated +running stats for mbrot (120): + 635 collections + 2234 ms elapsed cpu time, including 241 ms collecting + 2236 ms elapsed real time, including 243 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 62 ms elapsed cpu time, including 39 ms collecting + 62 ms elapsed real time, including 39 ms collecting + 2163176 bytes allocated +running stats for mbrot (120): + 635 collections + 2209 ms elapsed cpu time, including 242 ms collecting + 2211 ms elapsed real time, including 246 ms collecting + 2658913968 bytes allocated running stats for compile-nboyer: 2 collections 91 ms elapsed cpu time, including 41 ms collecting @@ -4940,6 +4990,56 @@ running stats for mazefun (2500): 2156 ms elapsed cpu time, including 71 ms collecting 2157 ms elapsed real time, including 72 ms collecting 425212336 bytes allocated +running stats for compile-mbrot: + 1 collection + 59 ms elapsed cpu time, including 37 ms collecting + 60 ms elapsed real time, including 38 ms collecting + 2048312 bytes allocated +running stats for mbrot (120): + 635 collections + 2081 ms elapsed cpu time, including 234 ms collecting + 2082 ms elapsed real time, including 237 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 59 ms elapsed cpu time, including 37 ms collecting + 60 ms elapsed real time, including 38 ms collecting + 2048312 bytes allocated +running stats for mbrot (120): + 635 collections + 2072 ms elapsed cpu time, including 235 ms collecting + 2075 ms elapsed real time, including 237 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 59 ms elapsed cpu time, including 37 ms collecting + 59 ms elapsed real time, including 37 ms collecting + 2048312 bytes allocated +running stats for mbrot (120): + 635 collections + 2079 ms elapsed cpu time, including 234 ms collecting + 2080 ms elapsed real time, including 236 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 59 ms elapsed cpu time, including 37 ms collecting + 60 ms elapsed real time, including 38 ms collecting + 2048312 bytes allocated +running stats for mbrot (120): + 635 collections + 2090 ms elapsed cpu time, including 235 ms collecting + 2092 ms elapsed real time, including 238 ms collecting + 2658913968 bytes allocated +running stats for compile-mbrot: + 1 collection + 58 ms elapsed cpu time, including 37 ms collecting + 59 ms elapsed real time, including 37 ms collecting + 2048312 bytes allocated +running stats for mbrot (120): + 635 collections + 2073 ms elapsed cpu time, including 234 ms collecting + 2075 ms elapsed real time, including 236 ms collecting + 2658913968 bytes allocated running stats for compile-nboyer: 1 collection 84 ms elapsed cpu time, including 37 ms collecting diff --git a/scheme/psyntax.expander.ss b/scheme/psyntax.expander.ss index 46e8513..6918ee7 100644 --- a/scheme/psyntax.expander.ss +++ b/scheme/psyntax.expander.ss @@ -3028,7 +3028,12 @@ (syntax-match e* () (((import imp* ...) b* ...) (eq? import 'import) (values imp* b*)) - (_ (error "invalid syntax of top-level program")))) + (((import . x) . y) (eq? import 'import) + (error 'expander + "invalid syntax of top-level program")) + (_ + (error 'expander + "top-level program is missing an (import ---) clause")))) (define top-level-expander (lambda (e*)