summaryrefslogtreecommitdiff
path: root/benchmark-suite
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-08 17:27:41 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-08 17:38:10 +0200
commit0a6506781ac1082d370b8359199a9d20eda74057 (patch)
treec6c400ac92e0089e25d2b243511f2ab1ccfdc3f2 /benchmark-suite
parent012062a0d61cbd297dd58c8168433518c8b450cc (diff)
add map and for-each benchmarks
* benchmark-suite/benchmarks/srfi-1.bm ("map", "for-each"): Add benchmarks.
Diffstat (limited to 'benchmark-suite')
-rw-r--r--benchmark-suite/benchmarks/srfi-1.bm19
1 files changed, 18 insertions, 1 deletions
diff --git a/benchmark-suite/benchmarks/srfi-1.bm b/benchmark-suite/benchmarks/srfi-1.bm
index 835608d41..67f79ca24 100644
--- a/benchmark-suite/benchmarks/srfi-1.bm
+++ b/benchmark-suite/benchmarks/srfi-1.bm
@@ -1,7 +1,7 @@
;;; -*- mode: scheme; coding: utf-8; -*-
;;; SRFI-1.
;;;
-;;; Copyright 2010 Free Software Foundation, Inc.
+;;; Copyright 2010, 2011 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
@@ -45,3 +45,20 @@
(benchmark "small" 2000000
(drop-while (lambda (n) #t) %small-list)))
+
+(with-benchmark-prefix "map"
+
+ (benchmark "big" 30
+ (map (lambda (x) x) %big-list))
+
+ (benchmark "small" 2000000
+ (map (lambda (x) x) %small-list)))
+
+(with-benchmark-prefix "for-each"
+
+ (benchmark "big" 30
+ (for-each (lambda (x) #f) %big-list))
+
+ (benchmark "small" 2000000
+ (for-each (lambda (x) #f) %small-list)))
+