From b064d565141ca777778fa38e0fe98c0aed834eb9 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 23 Apr 2012 04:27:34 -0400 Subject: 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. --- benchmark-suite/benchmarks/arithmetic.bm | 14 +++++++------- benchmark-suite/benchmarks/r6rs-arithmetic.bm | 8 ++++---- 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))) -- cgit v1.2.3