[Mono-dev] performance regression with your r56160 with generic method calls

Michal Moskal michal.moskal at gmail.com
Fri Mar 3 06:35:44 EST 2006


I've noticed that your patch:


and particularly the loader.c changes caused some drastic slowdowns in
generic method calls. It occurs in the Nemerle compiler. I didn't
notice it earlier, since our automatic testing procedures doesn't
mesure time.

A simple testcase to reproduce this is:

class Foo<A>
  public int test(int k)
    if (k < 2) return 1;
        else return this.test(k-1) + this.test(k-2);

class M{
  public static void Main ()
    Foo<string> f = new Foo<string> ();
        System.Console.WriteLine (f.test(23));

(and yes, I have also some real testcases doing something ;-)

It's about 30 times slower after the change.

   Michal Moskal,

More information about the Mono-devel-list mailing list