Discussion:
[Larceny-users] ANF size greater than 80000
Sven Hartrumpf
2016-02-16 17:11:11 UTC
Permalink
Hello.

When compiling large programs, I see the following warning:
"ANF size greater than 80000
Some global optimizations were not performed."

How important are these optimizations for the speed of resulting .slfasl files?

If very important:
Is it possible to change the variable anf-threshold in src/Compiler/pass3.sch?
What values should I try? (Long compile times would be no problem for me.)

Ciao
Sven
William D Clinger
2016-02-16 21:04:18 UTC
Permalink
Post by Sven Hartrumpf
"ANF size greater than 80000
Some global optimizations were not performed."
How important are these optimizations for the speed of resulting .slfasl files?
Those optimizations range from having hardly any effect
(which is common) to cutting the run time in half (much
less common). You might be able to estimate the effect
for your application by compiling some smaller kernel
with and without the global-optimization compiler switch.
Post by Sven Hartrumpf
Is it possible to change the variable anf-threshold in src/Compiler/pass3.sch?
What values should I try? (Long compile times would be no problem for me.)
You can make those thresholds as large as you want, but
let me warn you that the compile time can be a surprisingly
high-degree polynomial function of the threshold.

The problem is that those optimizations are still using a
linked-list representation of available expressions. Using
purely functional red/black trees instead should be viable
and would probably eliminate any practical need for that
threshold. Red/black trees are on my wish list; it's one
of the easier things to do that would significantly improve
Larceny's compiler.

Will

Loading...