yeah, we're just better then awk!

Raimo Niskanen raimo.niskanen@REDACTED
Thu Mar 6 12:13:52 CET 2003


If you just are reading from the 2d array, you could try a tuple of 
tuples (of elements). They kan be accesed by index (element(N, Tuple)), 
but if you need to change one element the whole tuple has to be rebuilt.

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Pierpaolo BERNARDI wrote:
> From: "Eric Merritt" <cyberlync@REDACTED>
> 
>> Yea the guy who did this has a comentary on Erlang
>>that basically says the same think. That its a nice
>>langauge and none of the tests are suited to its
>>strengths. 
> 
> 
> Hmmm...  I have been surprised by Erlang in a test 
> which probably is as far from its strengths as possible.
> 
> I rewrote in Erlang a Common Lisp program which,
> essentially, accesses repeatedly a big 2d array, 
> and does some manipulations of short lists.
> 
> I obtain these times:
> 
> Clisp: 11/12s
> HCL: 1.5/2s
> Erlang using gb_trees as arrays: 32/34s
> Erlang using an ets table as array: 7/8s
> 
> Clisp is a free CL that compiles to byte code.
> HCL is a commercial CL compiling to native code.
> Erlang is the byte code compiler, no Hipe.
> 
> I was expecting much worse results for Erlang.
> 
> Code available at http://space.tin.it/romebern/erlab.zip
> 
> BTW, is there a better data structure to be used as an array
> (i.e. a map from fixed length tuples of integers)?
> 
> P.
> 




More information about the erlang-questions mailing list