diff options
author | Björn Gustavsson <[email protected]> | 2019-07-31 14:57:56 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-08-01 13:26:44 +0200 |
commit | 6fce4280027a7bdbbbb106ade72fe7e1a33e4505 (patch) | |
tree | cf5b3ba4bc65159ee50f9fa825c0007121feff53 /erts/emulator/zlib/inffast.h | |
parent | 6c4ad85880375b242ac48a2bf439887f503ce203 (diff) | |
download | otp-6fce4280027a7bdbbbb106ade72fe7e1a33e4505.tar.gz otp-6fce4280027a7bdbbbb106ade72fe7e1a33e4505.tar.bz2 otp-6fce4280027a7bdbbbb106ade72fe7e1a33e4505.zip |
Avoid extremely long compilation times for huge functions
Compiling this example takes less than a second for OTP 21:
-define(B, {?A,?A,?A,?A,?A}).
-define(C, {?B,?B,?B,?B,?B}).
-define(D, {?C,?C,?C,?C,?C}).
-define(E, {?D,?D,?D}).
f() -> ?E = foo:bar().
The compilation time for OTP 22 is about 10 seconds. Most of the
time is spent in `beam_ssa_dead`.
This commit introduces several optimizations to bring the compilation
time down to about a second.
The most important of those optimizations is limiting the effort spent
searching forward for a joining point for the success and failure
labels for a two-way branch. This change is helped by the change of
representation of variable sets from `ordsets` to `cerl_sets`.
https://bugs.erlang.org/browse/ERL-1014
Diffstat (limited to 'erts/emulator/zlib/inffast.h')
0 files changed, 0 insertions, 0 deletions