[Mono-bugs] [Bug 684841] New: int::GetHashCode is slow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 4 08:35:01 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=684841

https://bugzilla.novell.com/show_bug.cgi?id=684841#c0


           Summary: int::GetHashCode is slow
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Compile and run using master mcs

using System;
using System.Diagnostics;

class Program
{
    static void Main (string[] args)
    {
        Stopwatch sw = new Stopwatch ();
        int value = 5;
        int res = 0;
        sw.Start ();
        for (int i = 0; i < 100000000; ++i) {
            res = value.GetHashCode ();
        }
        sw.Stop ();
        Console.WriteLine (res);
        Console.WriteLine (sw.ElapsedMilliseconds);
    }
}

On 64b machine

NET
17

Mono
75

-- 
Configure bugmail: https://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