Arrays vs. lists in Lisp: Why are lists so much faster in the code below?
问题 I got an unexpected result while solving Problem 75 in Project Euler. My code does find the correct solution, but it behaves strangely. My solution consists of traversing a Pythagorean tree (Barning's matrices) until the perimeter limit is reached, counting the numbers of times the perimeter assumed each value, and, lastly, counting the perimeter lengths that occurred only once. My admittedly untidy but functioning code is: (defparameter *barning-matrixes* '(#(1 -2 2) #(2 -1 2) #(2 -2 3) #(1