summaryrefslogtreecommitdiff
path: root/benchmark-suite
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-09-02 00:03:07 +0200
committerLudovic Courtès <ludo@gnu.org>2010-09-02 00:03:07 +0200
commitdcde43869ae42996fee7071790789322e214d78e (patch)
tree8c2d1abe2715db32fa38f85ae9eab6f610c4527f /benchmark-suite
parent5335850dbf9f11e9bbef0c8f88f12b684885db19 (diff)
SRFI-1: Rewrite `drop-right!', `drop-while', `reduce', etc. in Scheme.
This partially reverts commit e9508fbb7df0b1ead007637f16d80cf831776307 (May 3 2005). * module/srfi/srfi-1.scm (take!, drop-right!, reduce, reduce-right, take-while, take-while!, drop-while, span, span!, lset-adjoin): New procedures. * srfi/srfi-1.c (scm_srfi1_drop_right_x, scm_srfi1_drop_while, scm_srfi1_lset_adjoin, scm_srfi1_reduce, scm_srfi1_reduce_right, scm_srfi1_span, scm_srfi1_span_x, scm_srfi1_take_x, scm_srfi1_take_while, scm_srfi1_take_while_x): Rewrite as proxies to the corresponding Scheme procedures. * benchmark-suite/benchmarks/srfi-1.bm ("drop-while"): New benchmark prefix.
Diffstat (limited to 'benchmark-suite')
-rw-r--r--benchmark-suite/benchmarks/srfi-1.bm9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark-suite/benchmarks/srfi-1.bm b/benchmark-suite/benchmarks/srfi-1.bm
index e07d3b95f..835608d41 100644
--- a/benchmark-suite/benchmarks/srfi-1.bm
+++ b/benchmark-suite/benchmarks/srfi-1.bm
@@ -36,3 +36,12 @@
(benchmark "small" 2000000
(fold (lambda (x y) y) #f %small-list)))
+
+
+(with-benchmark-prefix "drop-while"
+
+ (benchmark "big" 30
+ (drop-while (lambda (n) #t) %big-list))
+
+ (benchmark "small" 2000000
+ (drop-while (lambda (n) #t) %small-list)))