[Q] svref vs. aref for fixnum arrays

Didier Verna <[email protected]> Wed, 05 Apr 2006 13:26:06 +0200
Newsgroups gmane.lisp.allegro
Organization EPITA Research and Development Laboratory
Message-ID <[email protected]>
        Hi !

I notice an important performance difference between these two fixnum array
implementations:

1/ simple-vector / svref
2/ simple-array / aref

Note that in my test cases, the arrays don't contain anything else than
fixnums, and the compiler is aware of that (no number comsing at all). Yet,
the simple-vector method is faster.

Is there an implementation difference between the two ? For instance, would
fixnums be shifted in the simple-array version by any chance ?


Thanks.

-- 
Didier Verna, [email protected], http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-BicĂȘtre, France   Fax.+33 (1) 53 14 59 22   [email protected]