C++ sucks
Martin Naef
EMAIL HIDDEN
Fri Nov 23 01:12:12 CET 2007
Hi Peter
Peter Korsten wrote:
>> I'm not denying that. But when I try to do low-latency machine vision
>> processing with a camera running at 200Hz, the last thing I need is
>> garbage collection kicking in at the wrong moment, and bounds checking
> One thing you have to keep in mind is the progress that dynamic
> optimisation has made over the last few years. There's no comparison
I'm not denying that. But in the example above, I get a factor of *ten*
in speed for image segmentation by using SSE2 code within a C++
application. That's what I mean by digging really deep. You also mention
that Java doesn't have an unsigned byte data type - that alone would
give me a factor of two in performance loss because it'd force me to use
a short int, and hence double memory bandwidth. Having total control
over memory layout is also crucial when you communicate with hardware -
such as a graphics card.
I'm well aware that I do very specialised things here, which are not
relevant to a large proportion of other software developers. But that's
exactly why I like C++: It give me all the power I want - I'm *in
control*, but the price I pay is that I'm also 100% responsible.
>> That means C++ is a great language. For me.
>
> No doubt, but if you're doing any processing that is not real-time, or
> anything that vaguely resembles accessing a database or doing network
> communication, you should have a look at Java. The implementation of
Agreed. But I don't do any of that, actually... (ok, network, occasionally)
Bye
Martin
--
http://www.navisto.ch
http://www.myspace.com/navisto
More information about the music-bar
mailing list