[Mono-bugs] [Bug 565637] New: Memory allocation very slow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Dec 17 10:53:38 EST 2009


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

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


           Summary: Memory allocation very slow
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: GC
        AssignedTo: lupus at novell.com
        ReportedBy: goldywhite at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0

Memory allocation is very slow (used Included Boehm GC).
Instructions like "newobj", "newarr", "box" are slower than ms implementation
in more than 10 times;



Reproducible: Always

Steps to Reproduce:
1.
2.
3.



Results for Windows x86 .NET, Windows x86 Mono, RHEL5.3 x64 Mono

D:\Projects\TestMono\DynLoad\bin\Debug>mono TestMono.exe
New[]: 4,41891294741494 Mop/s
New: 0,263157894736842 Mop/s
Set: 64,1025641025641 Mop/s
Get: 30,4878048780488 Mop/s
Call: 476,190476190476 Mop/s
Box: 6,02772754671489 Mop/s
Loop: 1111,11111111111 Mop/s


D:\Projects\TestMono\DynLoad\bin\Debug>TestMono.exe
New[]: 39,3700787401575 Mop/s
New: 0,714285714285714 Mop/s
Set: 77,5193798449612 Mop/s
Get: 82,6446280991736 Mop/s
Call: 144,927536231884 Mop/s
Box: 23,2018561484919 Mop/s
Loop: 106,382978723404 Mop/s


[root at localhost TestMono]# mono TestMono.exe
New[]: 6,54878847413229 Mop/s
New: 0,238095238095238 Mop/s
Set: 58,4795321637427 Mop/s
Get: 35,5871886120996 Mop/s
Call: 434,782608695652 Mop/s
Box: 18,5185185185185 Mop/s
Loop: 434,782608695652 Mop/s



Code for each result line seems like:
const int count = 10000000;
const int size = 3;

var sw = new Stopwatch();
sw.Start();
for (var i = 0; i < count; i++)
{
    arr = TestSome(size);
}
sw.Stop();
Console.WriteLine("Some: {0} Mop/s", count  / 1000.0 / sw.ElapsedMilliseconds);
sw.Reset();

Method bodies are:
New[]: return new int[size]
New: return new object();
Set: arr[i] = value; 
Get: return arr[i]; (return Type is Int32)
Call: empty method
Box: return (object)value; (value is Int32)
Loop: empty loop without calling any method

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