[Mono-bugs] [Bug 384356] New: Object creation 4x times slower on Mono than on MS.NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 28 09:26:17 EDT 2008


           Summary: Object creation 4x times slower on Mono than on MS.NET
           Product: Mono: Runtime
           Version: 1.9.0
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: omelnyk at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

The code below works runs much slower on Mono than on MS.NET:

MS.NET/Windows:     7s
Mono/Linux:        29s
Mono/Windows:   1m:32s

The timings above are based on assembly made with Microsoft C# compiler (with
/o+ option). When using Mono compiler, the results were slightly better for all
platforms, without changing the overall situation. Every test was run, at
least, twice. Timing was measured using Benchmark framework from DeveloperLand

Operating systems used:
- MS Windows XP Professional SP 2;
- Ubuntu 7.10 "Gutsy Gibbon";

Framework details:
- MS.NET 2.1.21022;
- Mono 1.9;

Hardware details:
- Core 2 Duo E6750 (2.6 GHz);
- 2 x 1GB Kingston DDR2 RAM;
- 2 x 320GB Seagate SATA2 ES HDD;


using System;

namespace MonoBenchmark
        class ValueContainer
                public int Value = 0;

                public ValueContainer(int i)
                        Value = i;

        class Program
                public static void Objects()
                        long sum = 0;
                        for (int i = 0; i < 1000000000; i++)
                                ValueContainer c = new ValueContainer(i);
                                sum += c.Value;


[1]: http://www.developerland.com/CSharpGeneral/Algorithms/89.aspx

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list