The Artima Developer Community
Sponsored Link

Weblogs Forum
Optimization: Me versus Guy Steele

31 replies on 3 pages. Most recent reply: Nov 5, 2005 1:10 AM by Bob Dobalina

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 31 replies on 3 pages [ « | 1 2 3 ]
bug not

Posts: 41
Nickname: bugmenot
Registered: Jul, 2004

Re: Speed Java vs C++ (Re: Optimization: Me versus Guy Steele Posted: Nov 4, 2005 3:57 PM
Reply to this message Reply
Advertisement
> Taking these in turn:
> * concurrency -- what do you think about Boost.Threads
> (www.boost.org)? How about CAS/CAS2/DCAS (lock free/wait
> free concurrency)? And what's wrong with POSIX threads?
> I understand Java's threading model is based on POSIX
> X threads and implemented in terms of them.

You understand little.
Does C/C++ remove unnecessary blocks from your code while the app is running? I think not. Also with C/C++ you're always programming to the OS.. the standard libraries are way too small.. so people end up reinventing the wheel.. badly.


>
> * dev tools -- really? Are you just talking about
> Eclipse? Eclipse does have a C++ environment. If you're
> talking about something else, I'm pretty sure C++ dev
> tools exist on par with it.
>

Eclipse, IntelliJ IDEA, Netbeans..

> * profiling tools -- again, really? I know gcov/gprof
> offer profiling, and I'm sure better profilers exist out
> there.
>
don't know what the original poster was saying.. C/C++ has good profilers

> * dev productivity/better libraries -- without something
> to back this up, I'm inclined to say this is a matter of
> opinion.

Dude! This is NOT a matter of opinion!
There are zillions of libraries INCLUDED with the Java platform.. moreso as you branch out!

With no extra instalation you can zip/unzip files, you can do GUIs, you can do networking, concurrency, concurrent data structures, regular expressions, ...

I'm just talking about what's included with Java. C++ has STL + iostream + C libs. Come on! No comparison here.

You'll say.. "use third party" but which 3rd party should you use? How are those skills transferable when you go to a new place where they don't know/use that library.

No comparison.. Java is waaaaaay better that C++ in this department.


>
> However, if we go back to that, "Most non-trivial
> applications, when written by an experienced team" part, I
> would be inclined to say that an experienced C++ team
> would get the Java abstraction just fine, and would then
> add on to that with abstractions available in C++ but that
> do no exist in Java.

We were a C++ team. We switched to Java (back in 1998 when Java wasn't all that good and had really crappy dev tools). In spite of our not knowing what we were doing in the new environment and considering we were a newly formed team of C++ programmers. It is quite surprising that our productivity leaped over the roof! Not only did we write code faster in Java.. we were also able to do things (like threads) use libraries (like OSS libraries from the Internet.. yes.. even then) that in C++ was just hard or clunky and therefore was usually avoided.

Also Java culture is of library use. C++ culture is invent your own. Java culture is OO. C++ culture is micro-optimization. Java culture is multi-threaded. C++ culture is make it simple 'cause the language is a bitch! (And this is coming from an experienced C++ programmer)

> would get the Java abstraction just fine, and would then
> add on to that with abstractions available in C++ but that
> do no exist in Java.

abstractions??
C++ has less abstraction and more low-level programming!

Bob Dobalina

Posts: 16
Nickname: hiredgoon
Registered: Apr, 2005

Re: Speed Java vs C++ (Re: Optimization: Me versus Guy Steele Posted: Nov 5, 2005 1:10 AM
Reply to this message Reply
>> abstractions??
>> C++ has less abstraction and more low-level programming!

C++ has more lower level programming AND more abstractions than Java. Here are some abstractions I can think of:

-Operator overloading
-Proper Templates, ie new T()
-Const objects
-Multiple Inheritance & inline functions vs code duplication
-Resource Aquisition is initialisation

Flat View: This topic has 31 replies on 3 pages [ « | 1  2  3 ]
Topic: The Trouble with Searching for Open-Source Code Previous Topic   Next Topic Topic: Generics: Bounds Puzzle

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use