From: Andreas Rottmann <a.rottmann@gmx.at>
To: guile-devel@gnu.org
Subject: [PATCH 1/3] Add a few benchmarks for R6RS fixnum arithmetic
Date: Sat, 2 Apr 2011 19:42:26 +0200 [thread overview]
Message-ID: <1301766148-20242-2-git-send-email-a.rottmann@gmx.at> (raw)
In-Reply-To: <1301766148-20242-1-git-send-email-a.rottmann@gmx.at>
* benchmark-suite/benchmarks/r6rs-arithmetic.bm: New file containing
some benchmarks for R6RS fixnum operations.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
benchmarks/r6rs-arithmetic.
---
benchmark-suite/Makefile.am | 1 +
benchmark-suite/benchmarks/r6rs-arithmetic.bm | 35 +++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 benchmark-suite/benchmarks/r6rs-arithmetic.bm
diff --git a/benchmark-suite/Makefile.am b/benchmark-suite/Makefile.am
index bac1df3..f29743f 100644
--- a/benchmark-suite/Makefile.am
+++ b/benchmark-suite/Makefile.am
@@ -6,6 +6,7 @@ SCM_BENCHMARKS = benchmarks/0-reference.bm \
benchmarks/if.bm \
benchmarks/logand.bm \
benchmarks/ports.bm \
+ benchmarks/r6rs-arithmetic.bm \
benchmarks/read.bm \
benchmarks/srfi-1.bm \
benchmarks/srfi-13.bm \
diff --git a/benchmark-suite/benchmarks/r6rs-arithmetic.bm b/benchmark-suite/benchmarks/r6rs-arithmetic.bm
new file mode 100644
index 0000000..4c9b8e6
--- /dev/null
+++ b/benchmark-suite/benchmarks/r6rs-arithmetic.bm
@@ -0,0 +1,35 @@
+;;; -*- mode: scheme; coding: utf-8; -*-
+;;; R6RS-specific arithmetic benchmarks
+;;;
+;;; Copyright (C) 2011 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
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this library. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(define-module (benchmarks r6rs-arithmetic)
+ #:use-module (benchmark-suite lib)
+ #:use-module (rnrs arithmetic fixnums))
+
+\f
+(with-benchmark-prefix "fixnum"
+
+ (benchmark "fixnum? [yes]" 1e7
+ (fixnum? 10000))
+
+ (let ((n (+ most-positive-fixnum 100)))
+ (benchmark "fixnum? [no]" 1e7
+ (fixnum? n)))
+
+ (benchmark "fxxor [2]" 1e7
+ (fxxor 3 8)))
--
1.7.4.1
next prev parent reply other threads:[~2011-04-02 17:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 23:20 Take some lowhanging fruit to speed up R6RS fixnum operations Andreas Rottmann
2011-03-22 23:20 ` [PATCH] " Andreas Rottmann
2011-03-24 21:51 ` Ludovic Courtès
2011-03-24 23:42 ` Andreas Rottmann
2011-03-25 12:16 ` Andreas Rottmann
2011-03-27 15:19 ` Ludovic Courtès
2011-03-27 22:20 ` Andreas Rottmann
2011-03-29 11:05 ` Andy Wingo
2011-03-30 1:37 ` Andreas Rottmann
2011-03-30 10:31 ` Andreas Rottmann
2011-03-30 10:58 ` Andreas Rottmann
2011-04-02 17:42 ` R6RS fixnum arithmetic optimizations Andreas Rottmann
2011-04-02 17:42 ` Andreas Rottmann [this message]
2011-04-02 17:42 ` [PATCH 2/3] Several optimizations for R6RS fixnum arithmetic Andreas Rottmann
2011-04-02 17:42 ` [PATCH 3/3] Add `fixnum?' VM primitive Andreas Rottmann
2011-04-04 21:53 ` Andy Wingo
2011-04-05 0:14 ` Andreas Rottmann
2011-04-06 12:42 ` define-inlinable Ludovic Courtès
2011-04-06 21:30 ` define-inlinable Andreas Rottmann
2011-04-06 22:24 ` define-inlinable Ludovic Courtès
2011-04-11 16:56 ` define-inlinable Andy Wingo
2011-04-11 20:01 ` define-inlinable Ludovic Courtès
2011-04-11 21:05 ` define-inlinable Andy Wingo
2011-04-11 22:11 ` define-inlinable Andreas Rottmann
2011-04-07 15:57 ` [PATCH 3/3] Add `fixnum?' VM primitive Ludovic Courtès
2011-04-04 21:28 ` Take some lowhanging fruit to speed up R6RS fixnum operations Andy Wingo
2011-04-04 22:00 ` Andreas Rottmann
2011-04-04 22:12 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301766148-20242-2-git-send-email-a.rottmann@gmx.at \
--to=a.rottmann@gmx.at \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).