[Openmcl-devel] list - vector
joakim at joakimsandgren.com
Sun May 17 17:42:12 EDT 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 musik
42, rue de Maubeuge
+33 (0)1 45 26 43 90
info at joakimsandgren.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel