otp-22: performance degradation

Alexey Antipov alexey.antipov@REDACTED
Tue Mar 31 11:08:06 CEST 2020


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