PowerShell, Learn it or Perish ;-)

master nix

Mono - 64-bit vs. 32-bit benchmark using SciMark

I wanted to compare 64-bit and 32-bit mono versions and PE32 vs PE32+ CIL images and see if 64-bit really is faster, at least on the number crunching side of things.

This is the C# port of the Scimark benchmark. The original C and Java sources can be found at The original work to port the benchmark to C# was done by Chris Re and Wener Vogels of the Rotor project.

Running an Apples to Apples comparision across platforms and different mono builds using different llvm versions jitting is not really a valid test-case. So the following benchmark matrix is based on the same clang/llvm version compiling the same mono version in x64 (PE32+) and i386 (PE32) archs on just one platform (my ‘old’ ‘MacBookPro).

Compile four different CIL (exe) images:

  • x64 and x86 Mono Debug (Debug Full, no optimize)
  • x64 and x86 Mono Release (No Debug, Optimized)

Execute 32-bit Mono and 62-bit Mono versions loading the respective CIL (exe) images:

  • LLVM turned off
  • LLVM turned on (–llvm)

The results are not really that surprising in regards to is 64-bit number crunching faster than 32-bit, yes, 64-bit it faster, about 1.2x faster. The surprise for me is the LLVM results, both in x86 and x64 versions of mono/llvm builds, mono enabled LLVM produces code that is 1.5x faster under SciMark. This speed difference is well worth the slightly longer startup times that jitting with LLVM causes.

Get the SciMark repo on my GitHub and run it on your platform.

CPU Arch Build Type LLVM Score (MFlops) Notes:
x86 Debug 371.42
x86 Debug Yes 465.45 1.2 times faster using LLVM
x86 Release 295.11
x86 Release Yes 448.92 1.5 times faster using LLVM over not
using it in Release mode
x64 Debug 367.22
x64 Debug Yes 559.28
x64 Release 370.79
x64 Release Yes 569.46 1.2 times faster than x86 using LLVM
1.5 times faster than x64 without LLVM