[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vector and List Performance
From: |
Pascal J. Bourguignon |
Subject: |
Re: Vector and List Performance |
Date: |
Wed, 10 Jun 2009 10:36:15 +0200 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) |
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> Nordlöw <per.nordlow@gmail.com> writes:
>
>> I tested the performance difference and strangely the vector version
>> of my benchmarking is only faster when the number of elements exceeds
>> roughy 1000. Why is this? Shouldn' aref() always be faster than nth
>> regardless of the size of the sequence?
>
> How could we say? You don't provide the full source of what you tested.
>
> Check my other post in this thread, and see how faster the vector
> accesses are. Try the same form in your CL implementation, and report
> the results here.
Sorry, I was in my comp.lang.lisp gears.
Just try the same form in emacs and tell us what you get.
In the meanwhile, a guess: you tested the creation of a big list
vs. the creation of a big vector (plus one access). Study closely my
form, and see what sub-expression is timed.
--
__Pascal Bourguignon__