473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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
Nov 17 '05 #1
10 1731
"Aykut" <ga***@atesgastro.com> wrote in
news:e8**************@TK2MSFTNGP12.phx.gbl:
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/
Nov 17 '05 #2
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" <ga***@atesgastro.com> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #3
Is c# definitely faster than java for that kind of operations?

"Frank Hileman" <fr******@no.spamming.prodigesoftware.com> wrote in message
news:eM**************@tk2msftngp13.phx.gbl...
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" <ga***@atesgastro.com> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl...
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


Nov 17 '05 #4
Aykut <ga***@atesgastro.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #5
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
"Aykut" <ga***@atesgastro.com> wrote in message
news:ex**************@TK2MSFTNGP15.phx.gbl...
Is c# definitely faster than java for that kind of operations?

Nov 17 '05 #6
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in news:MPG.1d285cb3243d65598c3b4
@msnews.microsoft.com:
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/
Nov 17 '05 #7
Chad Z. Hower aka Kudzu <cp**@hower.org> wrote:
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in news:MPG.1d285cb3243d65598c3b4
@msnews.microsoft.com:
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.


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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #8
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in
news:MP************************@msnews.microsoft.c om:
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/
Nov 17 '05 #9
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.
Nov 17 '05 #10
"Aykut" <ga***@atesgastro.com> wrote in
news:u5**************@tk2msftngp13.phx.gbl:
So is it reasonable that designing gui with c#
and for performance critical image processing parts using c++ and call
c++ functions form c#?


Yes.
--
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/
Nov 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JBiagio | last post by:
Hello All, I am attempting to learn a bit about the GDI+ transforms and charting data and I feel like I'm getting a handle on how the transforms work. My chart object has a large "canvas" bitmap...
12
by: Sanjay | last post by:
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the...
2
by: John Bailo | last post by:
I am walking through some of the very first sample code from the book "Beginning .NET Game Programming" from Apress. I identify his sample code with //SC This code puzzles me: Graphics graph...
14
by: Pmb | last post by:
At the moment I'm using Borland's C++ (http://www.borland.com/products/downloads/download_cbuilder.html#) I want to be able to take an array of points and plot them on the screen. Is there a way...
5
by: Charles A. Lackman | last post by:
Hello, I have created a complete PrintDocument and need to create an image from it. How is this done? e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
12
by: Xah Lee | last post by:
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet...
6
by: active | last post by:
I have an image and a graphics object created (FromImage) from that image. I need to create a new image and create a new graphics object from the new image. I want the new graphics object have...
9
by: DaveL | last post by:
hello I have a Bit map 1367 wide 32 high this bitmap contains like 40 separate Images 32x32 I tell it the id*32 to get the approiate Image from the source Bitmap When i CreateGraphics()...
8
by: Abhiraj Chauhan | last post by:
I need someone to make an example of how to create a graphics window in VB.net 2008. I understand the basics of how to draw a rectangle and lines etc. What I need is an example of how to make a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.