diff options
author | Björn Gustavsson <[email protected]> | 2015-04-16 08:14:28 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-22 10:14:55 +0200 |
commit | de9c0ab5295fb0a16b05c4df101074ce9cd6695b (patch) | |
tree | b10c3ace7daaf59047d77fada92195c3272d6166 /lib/erl_docgen/doc | |
parent | 68fdf06841859afc4de3ccdc26fac7b78e8b47db (diff) | |
download | otp-de9c0ab5295fb0a16b05c4df101074ce9cd6695b.tar.gz otp-de9c0ab5295fb0a16b05c4df101074ce9cd6695b.tar.bz2 otp-de9c0ab5295fb0a16b05c4df101074ce9cd6695b.zip |
beam_type: Eliminate redundant calls to checkerror_1/2
Profiling shows that the excution time for checkerror_1/2 could
be be near the top even for modules without any floating point
operations.
It turns out that the complexity of simplify_float_1/4 is quadratic.
checkerror/1 is called with the growing accumulator for each
iteration. checkerror/1 will traverse the entire accumulated list
*unless* some floating point operations are used.
We can avoid this situation if we only call checkerror/1 when there
are live floating point registers. We can also avoid calling flush/3
if there are no live floating point registers.
Diffstat (limited to 'lib/erl_docgen/doc')
0 files changed, 0 insertions, 0 deletions