[Mono-bugs] [Bug 630759] [sgen] is slower than boehm for value types
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Aug 12 12:18:13 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=630759
http://bugzilla.novell.com/show_bug.cgi?id=630759#c1
--- Comment #1 from Mark Probst <mprobst at novell.com> 2010-08-12 16:18:13 UTC ---
The problem here is that we don't have smart handling of indirect ref stores.
We always invoke the write barrier for them because the store might be to the
major heap. In this case the indirect store is to the stack, however, which
doesn't need a write barrier.
Here is a simpler example where the difference is even more pronounced:
using System;
using System.Diagnostics;
public sealed class Program
{
struct S
{
Program p;
public S (Program p)
{
this.p = p;
}
}
public static void Main()
{
Stopwatch sw;
Program p = new Program ();
sw = Stopwatch.StartNew();
for (int nn = 0; nn < 300000000; ++nn) {
S s = new S (p);
}
Console.WriteLine(sw.Elapsed + "\tM");
}
}
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list