mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-04 01:25:04 +03:00
core: fix bench and ignore form, because they were buggy
This commit is contained in:
parent
4c14cea5b0
commit
27a4a3edff
@ -27,7 +27,7 @@
|
|||||||
(defn ns-iter-inner [f n]
|
(defn ns-iter-inner [f n]
|
||||||
(let [start (get-time-elapsed)]
|
(let [start (get-time-elapsed)]
|
||||||
(do
|
(do
|
||||||
(for [i 0 n] (ignore f))
|
(for [i 0 n] (ignore (f)))
|
||||||
(Double.- (get-time-elapsed) start))))
|
(Double.- (get-time-elapsed) start))))
|
||||||
|
|
||||||
(defn print-bench-results [res total]
|
(defn print-bench-results [res total]
|
||||||
|
@ -196,4 +196,4 @@
|
|||||||
(list 'IO.println (list 'ref (build-str* forms))))
|
(list 'IO.println (list 'ref (build-str* forms))))
|
||||||
|
|
||||||
(defmacro ignore [form]
|
(defmacro ignore [form]
|
||||||
(let [_ form] ()))
|
(list 'let (array '_ form) (list)))
|
||||||
|
Loading…
Reference in New Issue
Block a user