Miguel de Icaza has a blog entry where he describes the new SIMD support in Mono. He has ported to C# a C++ application, to illustrate the new SIMD stuff, and then he compares the results, the C++ program was rather slow. I had a look at the source code an I've seen that the C++ program was compiled in debug mode.
I've decided to make a few tests for myself. I've used MinGW 4.3.2 and Visual Studio 2005, the tests where run on my Intel Mobile Core 2 Duo T7500.
Here are the results (in seconds):
The parameters for the above results were:
Mono is not quite there yet (at least on Windows).
I had to change the timing code for the C++ code, glib::GTimer is not a very good option on Windows. I've used the high-resolution performance counter, the code is presented below:
const int precision = 10000000;
unsigned long time = static_cast<unsigned long>(
(stop_.QuadPart - start_.QuadPart) * precision /
os << std::setfill('0');
os << std::setw(2) << time / precision / 3600 << ":";
os << std::setw(2) << time / precision % 3600 / 60 << ":";
os << std::setw(2) << time / precision % 60 << ".";
os << std::setw(7) << time % precision;
os << std::setfill(' ');
std::cout << "Time: " << timer.ToString() << std::endl;
#endif // PERFTIMER_H
There are a few things I would like to point out about the Mono 2.2 Windows installer.
1. The executable is not digitally signed by Novell.
2. The graphics are hideous, 16 colors dithering? why? Is anybody in their right mind running Windows in 16 colors?