C++ vs.C# in a graphics app.

  • Thread starter Thread starter Aykut
  • Start date Start date
A

Aykut

Hi,
we plan to develop an app. that will involve lots graphics operations like
open, zoom rotate ect.
and there will be a lot of math in it because of filters ,noise corrections
ect. on image.
Will there be too much performance difference with a c# and win32 c++ or
managed c++ code?
thanks for help
 
Aykut said:
we plan to develop an app. that will involve lots graphics operations
like open, zoom rotate ect.
and there will be a lot of math in it because of filters ,noise
corrections ect. on image.
Will there be too much performance difference with a c# and win32 c++
or managed c++ code?

Geranlly C++ non-IL will be much faster for such things. You should build an ASM with a
managed export using non IL and use it from C#.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/
 
We have found C# to be surprisingly fast even for low level pixel
operations, as long as you work with things like arrays of pixels, and not
high level APIs. Unsafe code in C# is not necessarily faster than an array
of pixels. The only way to tell for your specific case is to make specific
benchmarks.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
 
Aykut said:
Is c# definitely faster than java for that kind of operations?

While working with the raw data, they're probably about the same speed
- I would expect some kinds of operation to be faster with the Java
JVM, and some to be faster with .NET. The real difference is going to
be getting the data to and from the screen. I'd expect .NET to be
quicker there, but whether the overall process is faster depends on how
much time you're spending processing the data and how much time is
taken with the Win32 calls.
 
C# has structs which are faster than objects for large arrays of small data
types, like Points. For raw pixels I doubt there is much difference; you
need a benchmark.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
 
Jon Skeet said:
While working with the raw data, they're probably about the same speed
- I would expect some kinds of operation to be faster with the Java
JVM, and some to be faster with .NET. The real difference is going to

I havent done a lot of Java work, so take what I say regarding Java with a grain of salt. But in general
I've found C# code to be faster than Java code when running on the same hardware.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
 
Chad Z. Hower aka Kudzu said:
I havent done a lot of Java work, so take what I say regarding Java
with a grain of salt. But in general I've found C# code to be faster
than Java code when running on the same hardware.

While I haven't done *much* benchmarking, the little I have done shows
there to be not much difference between the two, and it alternates
between Java being faster and C# being faster.
 
Jon Skeet said:
While I haven't done *much* benchmarking, the little I have done shows
there to be not much difference between the two, and it alternates
between Java being faster and C# being faster.

This is what I've seen in most benchmarks - my results might be because of the type of work I
typicaly do.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
 
So is it reasonable that designing gui with c#
and for performance critical image processing parts using c++ and call c++
functions form c#?
regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top