mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
* benchmark-suite/benchmarks/bytevectors.bm: Add "coding: latin1" comment where Guile will find it. * benchmark-suite/benchmarks/chars.bm: Ditto. * benchmark-suite/benchmarks/srfi-13.bm: Ditto. * benchmark-suite/benchmarks/read.bm ("read"): Divide numbers of iterations by 10, so that the benchmarks complete within a few minutes. * benchmark-suite/lib.scm (benchmark): Use `run-benchmark' in macro definition, not `,run-benchmark'. * benchmark-suite/benchmarks/0-reference.bm, benchmark-suite/benchmarks/continuations.bm, benchmark-suite/benchmarks/if.bm, benchmark-suite/benchmarks/logand.bm: Add define-module. * benchmark-suite/results/neil-arudy: New file, containing benchmark results from my computer.
55 lines
1.1 KiB
Text
55 lines
1.1 KiB
Text
|
|
(define-module (benchmarks if)
|
|
:use-module (benchmark-suite lib))
|
|
|
|
(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)))
|