1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00
guile/benchmark-suite/benchmarks/if.bm
Dirk Herrmann 0237895653 * COPYING, README, Makefile.am, lib.scm, guile-benchmark: Copied
from the test-suite directory, renamed and adapted for use with
benchmarks.

* benchmarks/logand.bm, benchmarks/continuations.bm,
benchmarks/if.bm:  Added as initial fairly stupid examples for
benchmarks.
2002-07-20 01:21:36 +00:00

51 lines
1 KiB
Text

(with-benchmark-prefix "if-<expr>-then-else"
(benchmark "executing then" 330000
(if (quote #t) #t #f))
(benchmark "executing else" 330000
(if (quote #f) #t #f)))
(with-benchmark-prefix "if-<expr>-then"
(benchmark "executing then" 330000
(if (quote #t) #t))
(benchmark "executing else" 330000
(if (quote #f) #t)))
(with-benchmark-prefix "if-<iloc>-then-else"
(let ((x #t))
(benchmark "executing then" 330000
(if x #t #f)))
(let ((x #f))
(benchmark "executing else" 330000
(if x #t #f))))
(with-benchmark-prefix "if-<iloc>-then"
(let ((x #t))
(benchmark "executing then" 330000
(if x #t)))
(let ((x #f))
(benchmark "executing else" 330000
(if x #t))))
(with-benchmark-prefix "if-<bool>-then-else"
(benchmark "executing then" 330000
(if #t #t #f))
(benchmark "executing else" 330000
(if #f #t #f)))
(with-benchmark-prefix "if-<bool>-then"
(benchmark "executing then" 330000
(if #t #t))
(benchmark "executing else" 330000
(if #f #t)))