mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 14:22:25 +03:00
perf: fix perf3 to show total iters instead of / 3
The run-fn-for function was originally name run-fn and was hard-coded
to run for 3 seconds. I forgot to replace the 3 with the max-secs
variable. However, given that some implementations have less than
1 iteration per second, I'm just going to drop that division and
report the iterations per max-seconds so that for the slowest
implementations we have some relative comparison instead of all of
them just reporting 0.
Thanks to Tim Morgan for discovering this bug:
699f0ad23a
This commit is contained in:
parent
cd30e52b31
commit
6da59ec2f4
2
perf.mal
2
perf.mal
@ -24,4 +24,4 @@
|
||||
;; Warm it up first
|
||||
(run-fn-for* fn 1000 0 0)
|
||||
;; Now do the test
|
||||
(/ (run-fn-for* fn (* 1000 max-secs) 0 0) 3))))
|
||||
(run-fn-for* fn (* 1000 max-secs) 0 0))))
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
(def! atm (atom (list 0 1 2 3 4 5 6 7 8 9)))
|
||||
|
||||
(println "iters/s:"
|
||||
(println "iters over 10 seconds:"
|
||||
(run-fn-for
|
||||
(fn* []
|
||||
(do
|
||||
|
Loading…
Reference in New Issue
Block a user