[Openmcl-devel] list - vector

Joakim Sandgren joakim at joakimsandgren.com
Sun May 17 14:42:12 PDT 2009

It seems to me that the speed relations list/simple-vector has changed  
in ccl in comparison with mcl.

in mcl, the list was always faster until you wanted a element quite  
deep into a long list.

now, in ccl I did a dotimes test where I took the 100s element of a  
list using nth
and the 100 element of a simple-vector using svref.
The vector was much faster.
This was the normal relation in mcl too.

Then I took the 4th element in the same list (still with nth)
and the 4th element of the same vector with svref
and the vector is still clearly faster!!
This is new to me.

Should I abandon lists? And start to do everything in vectors?
Sometime in my project code I have some "heavy" searching fetching  
elements with search criteria in many quite long lists.
And this do take some time sometimes.
Again, should I start to use vectors, in ccl?...


Joakim Sandgren
joakim sandgren musik
42, rue de Maubeuge
75009 Paris
+33 (0)1 45 26 43 90
info at joakimsandgren.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090517/e4b5354c/attachment.htm>

More information about the Openmcl-devel mailing list