I have to disagree, if utilized properly managing memory, optimizing the cache, etc is very possible with c++ and can absolutely work well in a high performance environment On 12/22/10, Jerry Feldman <gaf@xxxxxxx> wrote: > On 12/22/2010 06:06 AM, les wrote: >> On Wed, 2010-12-22 at 13:49 -0500, Jerry Feldman wrote: >>> On 12/22/2010 01:40 PM, Parshwa Murdia wrote: >>>> On Wed, Dec 22, 2010 at 4:09 PM, les <hlhowell@xxxxxxxxxxx >>>> <mailto:hlhowell@xxxxxxxxxxx>> wrote: >>>> >>>> Since C++ is a preprocessor to C, how does it run circles around C? >>>> Just asking. >>>> >>>> >>> C++ is NOT a preprocessor to C. Some of the original C++ systems >>> certainly were, but nearly all C++ compilers are true compilers. A >>> properly optimized simple C++ program should be able to perform as well >>> as C. But, when you start taking into account template classes, and a >>> bunch of other things, then performance takes a back seat. Our code has >>> over 1,000,000 lines of code, and I would hate to have to maintain it as >>> a C system. (I'm glad I don't have to maintain it in the first place). >>> >> <off thread> >> I guess I should have stated that as "could be a preprocessor". >> >> I also must be showing my age ;-:) (showing the toothless, dentureless >> smile) >> >> Seriously, though the points you make about template classes, along with >> over use of inheritance, and bulky code in some classes makes C++ really >> a drag on high speed computing I think. >> >> I use C a lot, probably too much, but I don't do much in the way of >> huge programs. Most are 12,000 lines or less and I only get about 3 >> months to deliver them at most. Also the systems and people I deliver >> to, don't have extensive OOP experience and since they often maintain, >> or extend/maintain/modify the code, C++ would be a hardship on some of >> that, where as C's basic structure is a bit more challenging, but gives >> more direct control for their work. The largest code I ever personally >> developed was just over 40,000 lines. >> </offthread> >> >> >> >> > Basically, C++ is not going to work well in a high performance computing > environment. Templates and inheritance have their place. In essence C++ > and other OOP models should be designed. While that goes for all code, a > poorly designed C++ system could certainly have issues. But, I don't > want to get into the benefits of any one language. I've had to work with > classes that were not properly designed to where I had to write a base > class and take the existing class and inherit from the new base so that > the existing code would work. > > -- > Jerry Feldman <gaf@xxxxxxx> > Boston Linux and Unix > PGP key id: 537C5846 > PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846 > > > -- Sent from my mobile device -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines