summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-04-23 04:27:34 -0400
committerAndy Wingo <wingo@pobox.com>2012-04-23 21:46:06 +0200
commitb064d565141ca777778fa38e0fe98c0aed834eb9 (patch)
treec2171f3d7b95e60af69841abcae3ea66f5d667f6
parentd10f7b572c0ca1ccef87f9c46069daa30946e0cf (diff)
avoid inexact iteration count in benchmarks
* benchmark-suite/benchmarks/arithmetic.bm: * benchmark-suite/benchmarks/r6rs-arithmetic.bm: Use #e1e7 for the iteration count, instead of the flonum 1e7.
-rw-r--r--benchmark-suite/benchmarks/arithmetic.bm14
-rw-r--r--benchmark-suite/benchmarks/r6rs-arithmetic.bm8
2 files changed, 11 insertions, 11 deletions
diff --git a/benchmark-suite/benchmarks/arithmetic.bm b/benchmark-suite/benchmarks/arithmetic.bm
index c64f6c20b..e0a9bf3c1 100644
--- a/benchmark-suite/benchmarks/arithmetic.bm
+++ b/benchmark-suite/benchmarks/arithmetic.bm
@@ -1,7 +1,7 @@
;;; -*- mode: scheme; coding: utf-8; -*-
;;; Integer arithmetic.
;;;
-;;; Copyright 2010 Free Software Foundation, Inc.
+;;; Copyright 2010, 2012 Free Software Foundation, Inc.
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public License
@@ -48,20 +48,20 @@
(with-benchmark-prefix "fixnum"
- (benchmark "1+" 1e7
+ (benchmark "1+" #e1e7
(repeat (1+ <>) 2 100))
- (benchmark "1-" 1e7
+ (benchmark "1-" #e1e7
(repeat (1- <>) 2 100))
- (benchmark "+" 1e7
+ (benchmark "+" #e1e7
(repeat (+ 2 <>) 7 100))
- (benchmark "-" 1e7
+ (benchmark "-" #e1e7
(repeat (- 2 <>) 7 100))
- (benchmark "*" 1e7
+ (benchmark "*" #e1e7
(repeat (* 1 <>) 1 100))
- (benchmark "/" 1e7
+ (benchmark "/" #e1e7
(repeat (/ 2 <>) 1 100)))
diff --git a/benchmark-suite/benchmarks/r6rs-arithmetic.bm b/benchmark-suite/benchmarks/r6rs-arithmetic.bm
index 4c9b8e6b7..309f0666b 100644
--- a/benchmark-suite/benchmarks/r6rs-arithmetic.bm
+++ b/benchmark-suite/benchmarks/r6rs-arithmetic.bm
@@ -1,7 +1,7 @@
;;; -*- mode: scheme; coding: utf-8; -*-
;;; R6RS-specific arithmetic benchmarks
;;;
-;;; Copyright (C) 2011 Free Software Foundation, Inc.
+;;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
;;;
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@@ -24,12 +24,12 @@
(with-benchmark-prefix "fixnum"
- (benchmark "fixnum? [yes]" 1e7
+ (benchmark "fixnum? [yes]" #e1e7
(fixnum? 10000))
(let ((n (+ most-positive-fixnum 100)))
- (benchmark "fixnum? [no]" 1e7
+ (benchmark "fixnum? [no]" #e1e7
(fixnum? n)))
- (benchmark "fxxor [2]" 1e7
+ (benchmark "fxxor [2]" #e1e7
(fxxor 3 8)))