|From:||Jörg F. Wittenberger|
|Subject:||Re: [Chicken-users] Alist versus Hash-table|
|Date:||Tue, 12 Nov 2013 11:41:25 +0100|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5|
I did not look on your paste. But a few hints:
alists are O(n) while hashtable are O(1) .
However the constant involved is larger for hashtable then alists.
Therefore alists are fast for small numbers of elements in the list. Tables win when the number of elements becomes larger.
Another thing is about destructive updates vs. pure code. Destructive updates are usually faster because they produce little garbage, while pure code must copy the list upto the point of the update.
Am 12.11.2013 11:33, schrieb Loïc Faure-Lacroix:
|[Prev in Thread]||Current Thread||[Next in Thread]|