On Sun, Apr 3, 2011 at 9:46 PM, Christophe Rhodes <csr21@cantab.net> wrote:
Elliott Slaughter <elliottslaughter@gmail.com> writes:

> I noticed that simple-vector and an unspecialized simple-array have wildly
> different performance. As far as I can tell though, both are unspecialized
> with respect to fixnums.

simple-vector and (simple-array * (*)) are the same type.

Ok, how do you explain this 7x slowdown in the simple-array version?
* (test-dot-sv)

Evaluation took:
  1.071 seconds of real time
  1.069586 seconds of total run time (1.068155 user, 0.001431 system)
  99.91% CPU
  2,129,745,315 processor cycles
  0 bytes consed
  
NIL
* (test-dot-sa)

Evaluation took:
  7.447 seconds of real time
  7.443920 seconds of total run time (7.442668 user, 0.001252 system)
  99.96% CPU
  14,819,741,175 processor cycles
  0 bytes consed

--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay