Commit c38add28 authored by Stas Boukarev's avatar Stas Boukarev
Browse files

benchmarks.lisp: Add time-with-gc macro.

parent 8c5fe050
......@@ -13,10 +13,16 @@
(loop repeat amount
do (write-object object stream)))))
(defun gc ()
#+sbcl (sb-ext:gc :full t))
(defmacro time-with-gc (&body body)
`(progn (gc)
(time (progn ,@body))))
(defun load-test ()
#+sbcl (sb-ext:gc :full t)
(with-io-file (stream *test-file*)
(time
(time-with-gc
(loop repeat (read-next-object stream)
do (read-next-object stream)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment