There seems to be something strange going on in the process dictionary in R12B-0. <br><br>Operations which would take a tenth of a second in R11B-5 can now take more than 30 seconds. Please see test program below. <br><br>
Archictecture and OS: Linux laptop 2.6.24-rc1 #4 SMP Wed Oct 31 20:35:25 CET 2007 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-60 AuthenticAMD GNU/Linux<br>Erlang environment: Erlang (BEAM) emulator version 5.6 [source] [64-bit] [smp:2] [async-threads:0] [hipe] [kernel-poll:false]
<br><br>Thanks to Isaac Gouy for pointing out the differences between R11B-5 and R12B-0. The same problem can be found e.g. on the nsieve benchmark on the Computer Language Shootout on Intel P4/Gentoo (<a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=nsieve&lang=hipe&id=0">
http://shootout.alioth.debian.org/gp4/benchmark.php?test=nsieve&lang=hipe&id=0</a>).<br><br>BR /Fredrik Svahn<br><br>---<br>$ otp_src_R11B-5/bin/erl -noshell -noinput -run test main 100000 <br>{31993,ok}<br>{98370,ok}
<br>$ otp_src_R11B-5/bin/erl -noshell -noinput -run test main 110000<br>{35415,ok}<br>{104100,ok}<br>
<br>---<br>$ erlc test.erl<br>$ erl -noshell -noinput -run test main 100000<br>{100002,ok}<br>{3575867,ok}<br>$ erl -noshell -noinput -run test main 110000<br>{107884,ok}<br>{33342695,ok}<br><br><br>-module(test).<br>-export([main/1, dict/1, reverse_dict/2]).
<br><br>main([Arg]) -><br>    N=list_to_integer(Arg),<br>    io:format("~p~n",[timer:tc(?MODULE, reverse_dict, [N, 0])]),<br>    erase(),<br>    io:format("~p~n",[timer:tc(?MODULE, dict, [N])]),<br>

    erlang:halt(0).<br><br>reverse_dict(M, M) -> ok;<br>reverse_dict(M, I) -> put(M, 0), reverse_dict(M, I+1).<br><br>dict(1) -> ok;<br>dict(M) -> put(M, 0), dict(M-1).<br><br>