[Mono-bugs] [Bug 630759] New: [sgen] is slower than boehm for value types

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 12 10:43:00 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=630759

http://bugzilla.novell.com/show_bug.cgi?id=630759#c0


           Summary: [sgen] is slower than boehm for value types
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: GC
        AssignedTo: mprobst at novell.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


using System; 
using System.Diagnostics;

public sealed class Program 
{
    int l;

    struct S : IDisposable
    {
        Program p;
        int l;

        public S (Program p, int l)
        {
            this.p = p;
            this.l = l;
        }

        public void Dispose ()
        {
            p.l = l;
        }
    }

    public static void Main() 
    {
        Stopwatch sw;

        S[] i = new S [100000];
        Program p = new Program ();

        sw = Stopwatch.StartNew();
        for (int nn = 0; nn < 300000000; ++nn) {
            using (new S (p, nn)) {
            }
        }

        Console.WriteLine(sw.Elapsed);
        Console.WriteLine (i);
    }
}

sgen: 00:00:03.9920065
boehm: 00:00:01.6869965

-- 
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