Skip to content

Commit

Permalink
#19 declare optimize speed for distance-coords -- increase of 20%
Browse files Browse the repository at this point in the history
  • Loading branch information
mck- committed Mar 13, 2012
1 parent 9b4a797 commit 94d355b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/network.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

(defun distance-coords (x1 y1 x2 y2)
"Calculates pythagoras distance"
(declare (optimize (speed 3))
(flet ((square (x)
(* x x)))
(sqrt (+ (square (- x1 x2)) (square (- y1 y2))))))
Expand Down

0 comments on commit 94d355b

Please sign in to comment.