12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- (define-module (benchmarks subrs)
- :use-module (benchmark-suite lib))
- (define hook1 (make-hook 1))
- (define hook3 (make-hook 3))
- (with-benchmark-prefix "subr invocation"
- (benchmark "simple subr" 700000
-
- (1+ 0))
- (benchmark "generic subr" 700000
-
-
-
-
-
- (string= "foo" "bar"))
- (benchmark "generic subr with rest arg" 700000
-
- (run-hook hook1 1))
- (benchmark "generic subr with rest arg and 3+ parameters" 700000
-
-
-
- (run-hook hook3 1 2 3)))
- (with-benchmark-prefix "subr application"
- (benchmark "simple subr" 700000
- (apply 1+ '(0)))
- (benchmark "generic subr" 700000
- (apply string= "foo" '("bar")))
- (benchmark "generic subr with rest arg" 700000
- (apply run-hook hook1 '(1)))
- (benchmark "generic subr with rest arg and 3+ parameters" 700000
- (run-hook hook3 1 2 '(3))))
|