[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


Hi,

I've noticed that your patch:

  http://lists.ximian.com/pipermail/mono-patches/2006-January/070053.html

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:

#v+
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));
  }
}
#v-

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

It's about 30 times slower after the change.

--
   Michal Moskal,
   http://nemerle.org/~malekith/



More information about the Mono-devel-list mailing list