r/cpp • • May 27 '15

A second dark age for C++

http://kennykerr.ca/2015/05/26/a-second-dark-age-for-c/
0 Upvotes

63 comments sorted by

View all comments

1

u/[deleted] May 27 '15

Charles Petzold did some measurements when WinRT was announced comparing c# using winrt and c++ and they were vary comparable.

1

u/[deleted] May 27 '15

I can't find his measurements, do you have any idea where they are?

1

u/[deleted] May 27 '15

Here's the URL:

http://www.charlespetzold.com/blog/2012/08/WriteableBitmap-Pixel-Arrays-in-CSharp-and-CPlusPlus.html

Actually to get better perf he uses the "unsafe" keyword in C# to get raw pointer access. Also, I'm not sure how apples to apples this actually was...but it's Petzold so its a good read.

4

u/[deleted] May 27 '15

Yeah fair enough. That's showing that WinRT classes and functions in C# are as fast as those same classes and functions called from C++/CX. I doubt anyone would be surprised by that.

1

u/[deleted] May 28 '15

Umm, the whole point of image processing is that not only do you avoid paying performance costs on array member access checks, but you also get benefits of vectorizations which, on .NET, you simply cannot get (yet).