[Mono-dev] JIT and Inlining - why doesn't it happen?

Afonso nafonso at gmail.com
Thu Aug 27 16:15:55 EDT 2009


I'm also having a similar problem. Currently I have a test that with mono
takes 170ms on my machine, and if I run that same mono-compiled program in
windows, it runs at 23ms.

If I manually inline the function, the mono run goes from 170ms to around
55ms. This is problematic for my project.

basically this:
protected int Coord2Cell(Q coord, int level)
      Q a = coord >> (m_LogMinCell + level);
      a += Q.half;
      int ret = MathQ.FloorToInt(a);
      return ret;

became this:
protected int Coord2Cell(Q coord, int level)
      int a = coord.value >> (m_LogMinCell + level);
      a += 64;//Q.half;
      int ret = a >> 7;//MathQ.FloorToInt(a);
      return ret;

Q is a struct that only has an int.

Isn't there a way to improve the inlining?

View this message in context: http://www.nabble.com/JIT-and-Inlining---why-doesn%27t-it-happen--tp16991802p25151124.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list