mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
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.
This commit is contained in:
parent
d10f7b572c
commit
b064d56514
2 changed files with 11 additions and 11 deletions
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue