473,503 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# performance

hi, What is the performance hit of c# over visual c++. Would it be possible
to write photoshop in c# for example with no noticable speed loss?

thanks.
Nov 16 '05 #1
3 1576
"Daedelus" <da**********@yahoo.co.uk> wrote in
news:J0***************@newsfe2-gui.server.ntli.net...
hi, What is the performance hit of c# over visual c++. Would it be possible to write photoshop in c# for example with no noticable speed loss?


To my knowledge, noone did ever implement something like photoshop in c#;
However, the speed-relevant parts of it are (I think) more or less simple
calculations over huge arrays (applying filters, transformations, etc). In
my experience C# and C++ are about comparable in that respect, sometimes C#
is even a bit faster (after all, it gets compiled to native code, too).

Niki

Nov 16 '05 #2
"Daedelus" <da**********@yahoo.co.uk> schreef in bericht
news:J0***************@newsfe2-gui.server.ntli.net...
hi, What is the performance hit of c# over visual c++. Would it be possible to write photoshop in c# for example with no noticable speed loss?

thanks.


If you would work with getpixel and setpixel functions only it would be
really slow, but using unsafe code can make imageprocessing pretty fast.

There is a basic article on using unsafe code on images on msdn :
http://msdn.microsoft.com/library/de...rp11152001.asp

On codeproject there are some good articles about image processing (it's not
a full blown photoshop but it got some interesting functions) :
http://www.codeproject.com/cs/media/...cfilters11.asp
http://www.codeproject.com/cs/media/csharpfilters.asp
http://www.codeproject.com/cs/media/edge_detection.asp
http://www.codeproject.com/cs/media/...rocessing4.asp
http://www.codeproject.com/cs/media/...entfilters.asp
http://www.codeproject.com/cs/media/HSLColorSpace.asp

Yves
Nov 16 '05 #3
I wouldn't be surprised if the code in photoshop for applying filters is
actually handcoded assembly. Maybe not.

Still, C# could definitely handle something like photoshop without a
noticeable speed loss. There are plenty of programs that perform similar
manipulations of images that photoshop does and I haven't noticed any speed
issues with them. None of them are equivalents of photoshop in terms of
total functionality, but they might support a subset of the functionality.

Pete

"Daedelus" <da**********@yahoo.co.uk> wrote in message
news:J0***************@newsfe2-gui.server.ntli.net...
hi, What is the performance hit of c# over visual c++. Would it be possible to write photoshop in c# for example with no noticable speed loss?

thanks.

Nov 16 '05 #4

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

Similar topics

25
3452
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
12
17274
by: Fred | last post by:
Has anyone a link or any information comparing c and c++ as far as execution speed is concerned? Signal Processing algorithms would be welcome... Thanks Fred
12
8318
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I...
6
2304
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
5
3984
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL...
115
7468
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
13
2725
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
13
4097
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
7
2548
by: Michael D. Ober | last post by:
When calling Enqueue, the internal array may need to be reallocated. My question is by how much? In the old MFC array classes, you could tell MFC how many additional elements to add to the array...
1
2441
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
0
7202
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
7084
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
7278
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
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
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
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.