1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Unoptimize the busy loop of `statprof.test'.

This is a followup to f9c1b8278d ("Tweak
`statprof.test' for faster machines.").

* test-suite/tests/statprof.test ("statistical sample counts within
  expected range"): Compile with `#:partial-eval? #f'.
This commit is contained in:
Ludovic Courtès 2011-09-09 09:06:30 +02:00
parent 73df2c3742
commit a8d7fba8d4

View file

@ -40,8 +40,11 @@
;; make sure these are compiled so we're not swamped in `eval'
(define (make-func)
;; Disable partial evaluation so that `(+ i i)' doesn't get
;; stripped.
(compile '(lambda (n)
(do ((i 0 (+ i 1))) ((= 200 i)) (+ i i)))))
(do ((i 0 (+ i 1))) ((= 200 i)) (+ i i)))
#:opts '(#:partial-eval? #f)))
(define run-test
(compile '(lambda (num-calls funcs)
(let loop ((x num-calls) (funcs funcs))
@ -50,7 +53,7 @@
((car funcs) x)
(loop (- x 1) (cdr funcs))))))))
(let ((num-calls 20000000)
(let ((num-calls 80000)
(funcs (circular-list (make-func) (make-func) (make-func))))
;; Run test. 20000 us == 200 Hz.