Merge pull request #323 from jig/master
[jackhill/mal.git] / tests / perf3.mal
1 (load-file "../core.mal")
2 (load-file "../perf.mal")
3
4 ;;(prn "Start: basic macros/atom test")
5
6 (def! atm (atom (list 0 1 2 3 4 5 6 7 8 9)))
7
8 (println "iters/s:"
9 (run-fn-for
10 (fn* []
11 (do
12 (or false nil false nil false nil false nil false nil (first @atm))
13 (cond false 1 nil 2 false 3 nil 4 false 5 nil 6 "else" (first @atm))
14 (-> (deref atm) rest rest rest rest rest rest first)
15 (swap! atm (fn* [a] (concat (rest a) (list (first a)))))))
16 10))
17
18 ;;(prn "Done: basic macros/atom test")