[Larceny-users] ANF size greater than 80000

William D Clinger will at ccs.neu.edu
Tue Feb 16 16:04:18 EST 2016


Sven Hartrumpf wrote:

> 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?

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.

> 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.)

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



More information about the Larceny-users mailing list