efficiency, deep lists
Ulf Wiger
etxuwig@REDACTED
Wed Oct 3 13:03:02 CEST 2001
On Wed, 3 Oct 2001, Richard Carlsson wrote:
>On Tue, 2 Oct 2001, Ulf Wiger wrote:
>
>> The real function I rewrote was not (increment on deep lists),
>> but the following (slightly modified to protect the innocent):
>
>So the order of Value elements in the final list was not
>important? (Since your new version changes the order to strict
>left-to-right. Maybe this was also a bug fix?)
Uhm, perhaps you're seeing something I don't...?
Anyway, I did the following:
9> Keys = lists:seq(1,10).
[1,2,3,4,5,6,7,8,9,10]
10> continuation:get_values(Keys).
[1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...]
11> continuation:get_values2(Keys).
[1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...]
12> v(10) == v(11).
true
and therefore concluded that the functions were equivalent,
without any deeper code analysis.
/Uffe
--
Ulf Wiger tfn: +46 8 719 81 95
Senior System Architect mob: +46 70 519 81 95
Strategic Product & System Management ATM Multiservice Networks
Data Backbone & Optical Services Division Ericsson Telecom AB
More information about the erlang-questions
mailing list