https://bugzilla.novell.com/show_bug.cgi?id=644699
https://bugzilla.novell.com/show_bug.cgi?id=644699#c0 Summary: System.Math functions 2x slower than libc Classification: Mono Product: Mono: Class Libraries Version: 2.8.x Platform: i686 OS/Version: All Status: NEW Severity: Enhancement Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=393626) --> (http://bugzilla.novell.com/attachment.cgi?id=393626) C++ and C# code for 2 variants of benchmark Description of Problem: Benchmarks such as the "language shootout" nbody problem highlight a severe peformance problem with regard to fundamental numerical routines (such as Sqrt). In tests the mono implementation of Sqrt is 2x slower than libc or JVM implementations. libc uses MMX instructions in many cases and I believe that the mono implementation does not Other math functions in System.Math should also be inspected for their relative performance to libc. Suggest the build option or default to map many of the System.Math functions to libc calls short of a comparably performant implementation in Mono directly. Steps to reproduce the problem: 1. Run nbody benchmark on 64 bit linux box g++ version vs mono C# implementation 2. Run for 500 miilion iterators for fair comparison 2. Observe that C++ implementation 2x as fast 3. change calls to Math.Sqrt and sqrt() in C++ implementation to alternate inlined implementation 4. Observe that the performance of the 2 programs is 1:1 with an alternate impl. Actual Results: 191 seconds for mono run 92 seconds c++ run Expected Results: ~100 seconds for each How often does this happen? Additional Information: -- 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
