add psyntax as a kind of realistic-program benchmark (I'd like to have more)

svn: r17298
This commit is contained in:
Matthew Flatt 2009-12-14 23:51:09 +00:00
parent 9a62da5639
commit d13057d8c4
5 changed files with 15307 additions and 2 deletions

View File

@ -317,6 +317,9 @@ exec mzscheme -qu "$0" ${1+"$@"}
takr2 takr2
triangle)) triangle))
(define extra-benchmarks
'(psyntax))
(define (run-benchmark impl bm) (define (run-benchmark impl bm)
(let ([i (ormap (lambda (i) (let ([i (ormap (lambda (i)
(and (eq? impl (impl-name i)) (and (eq? impl (impl-name i))
@ -349,6 +352,7 @@ exec mzscheme -qu "$0" ${1+"$@"}
actual-implementations-to-run actual-implementations-to-run
num-iterations) num-iterations)
(process-command-line benchmarks (process-command-line benchmarks
extra-benchmarks
(map impl-name impls) obsolte-impls (map impl-name impls) obsolte-impls
3)) 3))

View File

@ -14,6 +14,7 @@
(define current-output-file (make-parameter #f)) (define current-output-file (make-parameter #f))
(define (process-command-line benchmarks (define (process-command-line benchmarks
extra-benchmarks
implementations non-default-implementations implementations non-default-implementations
num-iterations) num-iterations)
@ -50,7 +51,10 @@
(printf "Benchmarks:\n") (printf "Benchmarks:\n")
(for-each (lambda (bm) (for-each (lambda (bm)
(printf " ~a\n" bm)) (printf " ~a\n" bm))
benchmarks)] benchmarks)
(for-each (lambda (bm)
(printf " ~a (not run by default)\n" bm))
extra-benchmarks)]
[("-o" "--out") filename "append output to <filename>" [("-o" "--out") filename "append output to <filename>"
(current-output-file filename)] (current-output-file filename)]
[("-n" "--iters") n "set number of run iterations" [("-n" "--iters") n "set number of run iterations"
@ -80,7 +84,8 @@
(remq (cdr a) (remq (cdr a)
(or run-implementations default-implementations))) (or run-implementations default-implementations)))
(loop (cdr args)))] (loop (cdr args)))]
[(memq s benchmarks) [(or (memq s benchmarks)
(memq s extra-benchmarks))
=> =>
(lambda (l) (lambda (l)
(let* ([...? (and (pair? (cdr args)) (let* ([...? (and (pair? (cdr args))

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
#lang r5rs
(#%require scheme/include
(only scheme/base time))
(include "psyntax.sch")