[Mono-devel-list] ABC removal rewrite for performance

Massimiliano Mantione massi at ximian.com
Fri Jun 25 05:59:49 EDT 2004


/me is very happy :-)

ABC removal runs well.
I still do not consider it ready for prime time (more testing is
needed), but it is definitely working, and not crashing.

There are some corner cases that I must verify (the new code is
more effective that the previous one, so there are more potential
problems), and yet another theoretical issue with loops...
And there's always the problem of over/under-flow...

Now, the nice thing: the new code is more effective (removes 337
checks from mscorlib.dll, the old one removed 269 checks) and I
can easily gain some more without affecting compilation time (but
I still have to test that all these removals are correct :-( ).
But despite being more effective, the new code is also faster.

These are the min and max compilation times I get with this cmd:
time mono --compile-all -O=xxxxxx /usr/lib/mscorlib.dll

Options:     -O=deadce        -O=deadce,abcrem
Old code:    1.416s - 1.442s  2.638s - 2.646s
New code:    1.404s - 1.426s  1.416s - 1.433s

Basically, with the new code, abcrem could be turned on by default
whenever SSA is used (the overhead is very low)!

The "sparse approach" outlined in the ABCD paper is really
effective... too bad this code will not make it for for 1.0 :-(

Ciao,
  Massi

P.S. With the spirit "release early, release often", in case
anybody is interested and/or has some time to have a look at it,
I put the relevant files (still buggy) here:

http://primates.ximian.com/~massi/abcremoval.tar.gz

(no patch because it does not make sense, the rewrite is massive,
and sorry, it is not commented yet, I kept changing it too quickly
and keeping comments up to date would have been a pain)

One "bad" open issue is related to over/under-flows in arithmetical
operations, which can fool the optimizer.
See this file to understand what I mean:

http://primates.ximian.com/~massi/overflow.cs

I have some idea on how to handle this, but they are just hacks :-(





More information about the Mono-devel-list mailing list