Optimize `find-anonymous-variables`
After some profiling I found that this function was taking 4% of the total
runtime just on its own. The culprit was `tree-collect`, which does some
expensive things (like `(gensym)`). Because we know exactly what we need we can
write something much faster, and profiling confirms that this function isn't
even on the map any more.
author |
Steve Losh <steve@stevelosh.com> |
date |
Mon, 11 Jul 2016 21:38:03 +0000 |
parents |
23d4dc2900a1 |
children |
5c914fbcb042 |
(declaim (optimize (debug 3) (safety 3) (speed 0)))
(let ((*standard-output* (make-broadcast-stream))
(*error-output* (make-broadcast-stream)))
(asdf:load-system 'bones :force t)
(ql:quickload "bones-test"))
(defvar *passed* t)
(defun test (spec)
(let ((result (5am:run spec)))
(5am:explain! result)
(when (not (5am:results-status result))
(setf *passed* nil))))
(test :bones)
(test :bones.paip)
(test :bones.wam)
(test :bones.circle)
(let ((exit-code (if *passed* 0 1)))
#+sbcl (sb-ext:exit :code exit-code)
#+ccl (quit exit-code))