From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: [PATCH 1/3] Add a few benchmarks for R6RS fixnum arithmetic Date: Sat, 2 Apr 2011 19:42:26 +0200 Message-ID: <1301766148-20242-2-git-send-email-a.rottmann@gmx.at> References: <87wrjglvsq.fsf@gmx.at> <1301766148-20242-1-git-send-email-a.rottmann@gmx.at> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1301766222 21332 80.91.229.12 (2 Apr 2011 17:43:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Apr 2011 17:43:42 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 02 19:43:38 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q64rI-0007ZP-Fz for guile-devel@m.gmane.org; Sat, 02 Apr 2011 19:43:37 +0200 Original-Received: from localhost ([127.0.0.1]:50207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q64rG-0006I0-N7 for guile-devel@m.gmane.org; Sat, 02 Apr 2011 13:43:34 -0400 Original-Received: from [140.186.70.92] (port=60923 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q64rC-0006HV-CZ for guile-devel@gnu.org; Sat, 02 Apr 2011 13:43:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q64r9-0004Ll-Fy for guile-devel@gnu.org; Sat, 02 Apr 2011 13:43:30 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:33187) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q64r9-0004Ki-2y for guile-devel@gnu.org; Sat, 02 Apr 2011 13:43:27 -0400 Original-Received: (qmail invoked by alias); 02 Apr 2011 17:43:22 -0000 Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan) [83.215.154.5] by mail.gmx.net (mp047) with SMTP; 02 Apr 2011 19:43:22 +0200 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX18HJh564cgHqmRCAiqnEj0Kr44BGGrosg1r2YIlCS GhU3d189A2MnsJ Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by nathot.lan (Postfix) with ESMTP id E660E3A69E; Sat, 2 Apr 2011 19:43:21 +0200 (CEST) Original-Received: from nathot.lan ([127.0.0.1]) by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cffoePs+Z-yS; Sat, 2 Apr 2011 19:43:17 +0200 (CEST) Original-Received: from delenn.lan (delenn.lan [192.168.3.11]) by nathot.lan (Postfix) with ESMTP id 0C6F13A691; Sat, 2 Apr 2011 19:43:17 +0200 (CEST) Original-Received: by delenn.lan (Postfix, from userid 1000) id EB0E12C00C1; Sat, 2 Apr 2011 19:43:16 +0200 (CEST) X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1301766148-20242-1-git-send-email-a.rottmann@gmx.at> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12145 Archived-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 +;;; . + +(define-module (benchmarks r6rs-arithmetic) + #:use-module (benchmark-suite lib) + #:use-module (rnrs arithmetic fixnums)) + + +(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