by prog on 6/20/11, 10:46 AM with 35 comments
by cageface on 6/20/11, 1:30 PM
With the glaring exception of numeric code, which is the most crucial thing for a lot of apps that are now written in C++. You'd be crazy to write a native CRUD app in C++ now but most of the big C++ apps I can think of do heavy work in numerics (Photoshop, Ableton, Maya, etc).
by bitdiffusion on 6/20/11, 1:10 PM
The language-agnostic version of this article: you can write slow code in any language.
by S_A_P on 6/20/11, 1:33 PM
by ghenne on 6/20/11, 1:26 PM
CuWin 3500, CE5, NS Basic/CE 8 NS Basic/CE: 26529 loops/second Microsoft .NET: 133 loops/second
Acer beTouch E101 Windows Mobile 6.5, 528 mhz, NS Basic/CE 8.0 NS Basic/CE: NS Basic/CE: 16669 loops/second Microsoft .NET: 3060 loops/second
CuWin 5500, CE6, NS Basic/CE 8 NS Basic/CE: 14394 loops/second Microsoft .NET: 764 loops/second
i-mate 400mhz, WM5, NS Basic/CE 8.0 NS Basic/CE: 12632 loops/second Microsoft .NET: 1290 loops/second
Running the same test under NS Basic/App Studio, an iPhone 4 scores 282,674, Nexus One is 403,000 and the Motorola Xoom is 718,484. Plainly, Windows CE.NET has a long way to go!
by scott_s on 6/20/11, 1:27 PM
by kevingadd on 6/20/11, 1:07 PM
by pragmatic on 6/20/11, 2:53 PM
When I was working through project Euler (http://projecteuler.net/) with various languages, the only one I really had to optimize was Python (vs C/C#/Haskell).
I really like Python, and for most stuff it's fast enough. Just saying the real penalty (that I noticed) is a scripting language, _if_ it's heavily arithmetically constrained.
Some (non-trivial) games in C#: http://www.arcengames.com/w/index.php/aiwar-alienbundle
However, it's possible and even practical to also write games in Python. See the pygame project.
by adolgert on 6/20/11, 4:33 PM
Now I want to see higher-level tests, where algorithms reading significant data or application-level benchmarks are run. The faster the CPU core, the less penalty there will be from C# compilation. The problem is that it would take lots of time to translate something like WORF, GAMESS, or other standard numerical benchmarks.
by peacemaker on 6/20/11, 12:59 PM
by shin_lao on 6/20/11, 5:30 PM
Basically he didn't turn on all optimizations on the C++ program and used the "slow but secure" version of the Microsoft STL.
Also his GenericSum uses array in C++ and lists in C#, so the C++ has to reallocate at each append.
I could go on for long, I appreciate the intent, but all you need to know is that Microsoft gave up on using C# everywhere because it's damn too slow.
by lutorm on 6/20/11, 1:59 PM
by omouse on 6/20/11, 5:37 PM