[Mono-dev] System.Decimal performance

Zoltan Varga vargaz at gmail.com
Mon Jun 2 16:15:28 EDT 2008


                 Hi,

  The next mono release (2.0) will have better decimal performance, especially
when doing divisions.

                    Zoltan

2008/5/29 Leszek Ciesielski <skolima at gmail.com>:
> Hi,
>
> the company I work for builds finance-related software, so we use the
> Decimal type a lot. And in any computation-heavy program we find that
> the Mono implementation of the decimal type... well... let's just say
> it's not on par with MS.Net performance ;-) . Addition, substraction
> and multiplication lag a bit (2-4 times slower). However, division is
> at least 10 times slower, in some cases even 50x! I don't have any
> complex tests at hand right now, but a simple performance-measuring
> program is attached to the mail. There's also a java version (although
> BigDecimal is not a simple equivalent of System.Decimal as it has no
> upper bound on available precision). From my simple test the results
> are as follows:
>
> MS.Net 3.5
> addition 2375 ms : 2354,156132
> substraction 2140,625 ms : 2337,043868
> multiplication 1734,375 ms : 189,08461995264
> division 8468,75 ms : 29097,233616240416508043573961
>
> Mono 1.9 Windows 2.0 profile
> addition 4812 ms : 2354,156132
> substraction 4781 ms : 2337,043868
> multiplication 3407 ms : 189,08461995264
> division 61390 ms : 29097,233616240416508043573961
>
> Mono svn-linux 2.0 profile
> addition 4201.837 ms : 2354.156132
> substraction 4413.458 ms : 2337.043868
> multiplication 4489.036 ms : 189.08461995264
> division 61303.573 ms : 29097.233616240416508043573961
>
> Java 1.6.0_06
> addition 4640 ms : 2354.156132
> substraction 3969 ms : 2337.043868
> multiplication 2219 ms : 189.08461995264
> division 33376 ms : 29097.233616240416508043573961
>
> Has anyone done any performance tunining with the decimal type?
>
> Regards,
>
> Leszek 'skolima' Ciesielski
>
> --
> MS-DOS user since 5.0
> Windows user since 3.11
> Linux user since kernel 2.4
> Novell Netware user since 2.2
> WARCRAFT user since 1.0
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


More information about the Mono-devel-list mailing list