otp-22: performance degradation

Alexey Antipov alexey.antipov@REDACTED
Thu Apr 2 16:10:21 CEST 2020


So I created a ticked on it:
https://bugs.erlang.org/browse/ERL-1216

вт, 31 мар. 2020 г. в 11:47, John Högberg <john.hogberg@REDACTED>:
>
> Hi!
>
> Thanks for pointing this out. As far as I can tell it doesn't have anything to do with dict, but is caused by lists:mapfoldl/3 using much more stack space than in OTP 21. We'll try to have this fixed before OTP 23.0-rc3.
>
> /John
>
> -----Original Message-----
> From: erlang-questions <erlang-questions-bounces@REDACTED> On Behalf Of Alexey Antipov
> Sent: Tuesday, March 31, 2020 11:08
> To: erlang-questions@REDACTED
> Subject: otp-22: performance degradation
>
> Hi,
>
> I  noticed that using of dict in some cases is significantly degraded in otp-22 comparing with otp-21.
>
> Code:
>
> ~~~~~
> #!/usr/bin/env escript
>
> -mode(compile).
>
> main([]) ->
>   {Time,_} = timer:tc(fun() ->
>                           %% lists:foldl has no degradation
>                           lists:mapfoldl(fun(K,Dict) -> {1,dict:store(K,1,Dict)} end,
>                                          dict:new(),
>                                          lists:seq(1, 166666))
>                       end),
>   io:format("Time: ~b~n", [Time]),
>   ok.
> ~~~~~
>
> 21.3.8.3: Time: 615437
> 22.3: Time: 5405957
> 23.0-rc2: Time: 5569684
>
> Is this a known issue?
> Should I create an issue at bugs.erlang.org?
>
> Thanks


More information about the erlang-questions mailing list