[Mono-devel-list] ABC removal benchmarks

Ben Maurer bmaurer at ximian.com
Tue Jul 13 11:07:22 EDT 2004

On Tue, 2004-07-13 at 10:14, massi at ximian.com wrote:
> - QuickSortObject is an object sorting routine, in this case
>   applied to String objects.
With this test case, you are not going to get much luck. The object []
array needs to use stelem.ref to store objects. This opcode must do a
complex check (consider object [] x = new string [5]; x [1] = new object
(); this code must throw an ArrayTypeMismatch exception).

So, it is expected that abcrem does not do much here. 

> - QuickSortInt is the same sorting routine, rewritten for the
>   int primitive type (generics would have helped here, but I
>   wanted this to stay a 1.0 thing)

How will abcrem play out with generics? If I have:

static void Foo <T> (T [] x, T [] y) {
	if (x.Length != y.Length)
		throw new Exception ();

	for (int i = 0; i < x.Length; i ++)
		x [i] = y [i];

Can you optimize that? For objects we cant (it will use stelem.ref), but
for other types we can.

> Of course, compilation times are not "improved", but it can
> be clearly seen that once the SSA form is built (like with
> the "deadce" option), abcrem does not take that much more :-)
It would be nice to investigate the time to build SSA. There are some
interesting papers on this subject. One thing that I noticed is that we
are using the pruned SSA form. This means we must do liveness scanning
(which is fairly slow). It would be interesting to see if we could get a
performance boost by using semi-pruned form.

Can you get your benchmarks into mono/mono/benchmark?

-- Ben

More information about the Mono-devel-list mailing list