Debian Codegraph @

benchmarks/bench.ss

raw
1 #!../src/ikarus -b ../scheme/ikarus.boot --r6rs-script
2 ;;; Ikarus Scheme -- A compiler for R6RS Scheme.
3 ;;; Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum
4 ;;;
5 ;;; This program is free software: you can redistribute it and/or modify
6 ;;; it under the terms of the GNU General Public License version 3 as
7 ;;; published by the Free Software Foundation.
8 ;;;
9 ;;; This program is distributed in the hope that it will be useful, but
10 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18 (import (ikarus))
19 (optimize-level 2)
20 ;(cp0-effort-limit 100)
21 ;(cp0-size-limit 10)
22 ;(optimizer-output #t)
23 (pretty-width 200)
24 (define (run name)
25 (let ([proc (time-it (format "compile-~a" name)
26 (lambda ()
27 (eval 'main
28 (environment
29 (list 'rnrs-benchmarks name)))))])
30 (proc)))
31
32 (verbose-timer #t)
33 (apply
34 (case-lambda
35 [(script-name bench-name)
36 (run (string->symbol bench-name))]
37 [(script-name . args)
38 (error script-name
39 (if (null? args)
40 "missing benchmark name"
41 "too many arguments"))])
42 (command-line-arguments))