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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to