Good IDE for C++

Pages: 12
Hi,

I'm doing my reaserch regarding IDE's that can be used for writing and debugging C++ code.
I personally use QT Creator IDE on Mac OS X as it's quick and elegant IDE for C++ programmer. It has very nicely integrated debugger and it's super easy to use. It looks the same on Windows (which may be a factor for some programmers).

In past I used Visual C++ by Microsoft and Eclipse with CDT - those two are also very good (VC++ is probably the best I ever used).

Can you guys and gals share your experiences with IDE's you're using (or used in the past) ?

Thanks in advance!

M.
closed account (1yR4jE8b)
I like Code::Blocks, but it's getting old there should be a new release soon but I'm really impatient. Currently I use Visual Studio 2010 on Windows based stuff - Direct X stuff mostly, but for everything else I use the newest version of Netbeans.
QtCreator is fast like hell, but has its own platform and method to use with qmake. Code::Blocks is good, but I don't like its standard for shortcuts.

Netbeans and Eclipse are good, but are slow, since they're written in Java... I don't use them anymore... they made me really sick.

I depend now totally on QtCreator for everything. I like its colour-codes, and it's really fast, and cross-platform.
Last edited on
Well, when I have a computer without a wiped hard drive (I made a mistake with partitioning and installing Linux and wiped everything), I use Code::Blocks, VS2010, And QT for C++. I don't like the C++ versions of Netbeans or Eclipse. It all just depends on what I'm doing. If I'm working with Win32 or DirectX, I'll use VS. If I'm working on a smaller project I use C::B. I use QT for everything else
closed account (S6k9GNh0)
I find CodeLite to be my favorite IDE (if I ever use one). I generally just use Scite and send diff patches to whatever project I contribute too...

Netbeans and Eclipse are good, but are slow, since they're written in Java..


1. They are not slow. They are only slow to start and require more RAM.
2. They are slow to start not because they are written in Java, but because they are much more functional and *modular* then QtCreator. QtCreator is monolythic, only for C++ and a single framework, while Netbeans and Eclipse support dozen of languages, zillion of plugins and frameworks, including C++ and Qt. Actually, lots of those plugins you don't need are enabled by default. I could easily make my Eclipse start within < 2 seconds just by disabling some plugins.

To this end, QTCreator still sometimes can eat 1.5 GB RAM on a large project, so it is not really any different than Eclipse. :D

How many times a day do you start up your IDE? :D
Last edited on
Never heard about CodeBlocks before. Just downloaded it and installed. Indeed very nice IDE, but version I have 10.05 is very unstable - for example changing size of fonts in editor crashes whole IDE.

Regarding NetBeans. Never tried it with C++, but used to use it with Ruby and remember it being very slow indeed - slow to start and the longer it stays open the slower it gets. DOn't know whether this was just "feature" of this particular version (for Ruby).

M.
@rapidcoder

It's not only about starting. It's about the whole coding thingy. Auto-completion is slow with netbeans, and the response time when clicking on stuff is also slow. Qt is written with pure C++. If you really are comparing the performance a program written with C++ with a program written on Java, then, I'm sorry my friend, you still have a lot to learn about the difference between having something run on a virtual machine and something talking directly to the processor. ;-)

Code::blocks is fast because it's written with C++. Everything with Java sucks to the latter... I kept being reluctant to this fact till I really found the difference between everything written with Java and everything written on C++. Of course, I mean stuff on Windows and Linux, not on Android. Java fits Android very well, but it's a bad choice for Windows programming. :)

Don't make me get you some real numbers about the difference of speed between C++ and Java. The difference in speed is at least 50% more for C++ up to 150%.

@marcinos: Give QtCreator a try. I promise you'll never regret it! It's very efficient, and fast, and choosing between different compilers is very easy and can be done with 2 clicks, unlike other IDEs where you have to navigate through options and mess stuff up, and QtCreator has the option Shadow Building Automatically creates parallel folders for your different builds with different compilers leaving your sources folder untouched, which makes cleaning up very easy. It's really practical for big projects.

Cheers :)
closed account (1yR4jE8b)
Don't make me get you some real numbers about the difference of speed between C++ and Java. The difference in speed is at least 50% more for C++ up to 150%.


You must be new here.

rapidcoder is our resident JVM expert. And if you actually bothered to look up modern JVM vs C++ benchmarks, you'll see that the parity between Java and C++ is very small. Modern JVM performance is faster than C++ in lots of areas, and about equal in many others with C++ faster in only some areas.
@darkestfright: Are you kidding me? I do such bench marks myself like when I create a vector and push back some elements and check the time it requires to do that. C++ is way faster in I/O and processor events. I would never ever believe that Java could ever be faster than C++, and you would be kidding yourself if you believe that. Perhaps in 100 years they could be equally fast; but faster? come on!!!

Your argument is like if you would want to press a button on a panel, and either go do it with your hand (C++ talks directly to the processor) or take a stick and point it to the panel to push that button (JVM in between). It could never ever be as fast as when you do it just with your hand. Whenever you put anything in the middle it gets slower, that's a rule in nature.

Are you very certain about your beliefs? prove it! write a small program with Java, and the same small program with C++, and show me better numbers with Java... if you ever (and you won't, I promise) get better numbers with Java, I'll give up and confess that Java is something really worth it and I'll start learning it immediately!!

No offense, just a little logic vs. belief challenge :-)

Anyone up? please be my guest!!

I do such bench marks myself like when I create a vector and push back some elements and check the time it requires to do that


Search this forum a bit - there already was a benchmark like that posted here. As far as I remember, Java outperformed C++ on appending vectors by about 2x-4x probably due to much faster heap allocation.

Oh, do it for you:
http://www.cplusplus.com/forum/unices/64290/


C++ is way faster in I/O and processor events.


Actually C++ iostream performance and usability suck and it is not me who stated this on these forums first. And if we are talking about I/O, we should be talking about databases. Big databases. Let's see who is the leader there:

http://www.datastax.com/2012/04/the-five-minute-interview-%E2%80%93-appscale


We’ve made Cassandra our default datastore because our benchmarks have shown it to be the highest performing database over all the others. We’ve done quite a bit of research in this area that shows this to be the case, and have written a number of research papers on the subject.


They claim a pure-Java database system is faster than a leading database system written in C++. Are they crazy?


Auto-completion is slow with netbeans, and the response time when clicking on stuff is also slow.


I don't use NetBeans, but I use IntelliJ IDEA a lot. And guess what? Auto-completion is instantaneous, even for Scala which got mich more sophisticated and powerful type system than C++, and which is probably harder to get autocompletion and error highlighting right. Clicking on stuff is fast enough that I don't have to wait.


write a small program with Java, and the same small program with C++, and show me better numbers with Java


Java sucks at small programs. Period.

Last edited on
@rapidcoder: In that post in the forum, it's not fair at all to use an opensource compiler vs a commercial compiler. We all know gcc and its problems. Use intel compiler under linux or go for Visual Studio compiler under windows (and run your java program under windows, of course) and do your magic comparisons, and I promise Java won't win. I myself found the difference between gcc and icpc to be more than 300%.

Note: I'm a physicist, and not a software engineer. My programs and simulations run for days and the time factor is very important for us. We always measure the difference and performance of compilers and languages.

About this interview, those people in companies do business deals that don't only have to deal with performance of their programs but many other factors. I wouldn't rely on such a small sentence from a single company. I could tell you simply he's just justifying using that database system, while other gazillion companies don't.

I used netbeans and eclipse, and they made me really sick with all the huge advantages they have. It makes me sick to have to wait more than 200ms whenever I click on an option, and it even goes up to seconds sometimes. I was an online-gamer, and I feel the difference between 20ms and 200ms for sure. QtCreator is almost instantaneous with its respond times.

And the funniest thing you said is the last:

Java sucks at small programs. Period.


I'm not sure you're being sarcastic or what, but you most likely aren't. So let me tell you another rule of nature. If something sucks when it's small, it never gets better when you accumulate more units of it, it doesn't even get simpler for you to do your measurements unless you have a good reason for it. That's why all experiments in the world tend to be simpler than more complicated. If you want to measure the radius of the proton, you don't go for an element with 10000 protons, you just use the simplest one you have. And if Java sucks at small programs, then it sucks at everything. It's all about good management and programming.

A quote from a friend: "Java is a language for those who find C++ hard".
Ah now we've ventured into the infamous java vs. c++ debate. The fact of the matter is, Java has its place and so does C++. On equal tests (Which likely is impossible), C++ will perform better in a lot of situations, while Java will perform better in others. But, you don't always need one or the other. Java was designed to be an easier, less efficient c++. So people use Java if they don't need to crank out as much per cycle as possible. Now the difference between performances is not nearly as drastic as stated above, but there is a difference and always be.
closed account (S6k9GNh0)
The two aren't comparable, they dont' do the same thing, they never will, stop bringing the f$%king topic up. If I had the ability to shut the thread down, I would, because we all know this is going to now be a four page thread about Java vs C++ which doesn't even make sense.

rapidcoder, I don't really care if you compare things to Java and C++, but you can't definitively say that one thing is better than the other. I don't really give a fuck about benchmarks when it comes to such debates, one side can always be worse or better than the other. That's not what this topic is about.
Last edited on

So let me tell you another rule of nature. If something sucks when it's small, it never gets better when you accumulate more units of it....


So wrong, but I won't discuss it because it would be even more offtopic. And we are talking about IDEs here.

As for performance, once I met a coder who saw me hacking something in Eclipse. He said, dude, Eclipse is fucking slow, because it is Java... Well, just like you on this forum. I asked him, what I should be using then? He answered "IntelliJ IDEA. It is in C++". :D

So once again: it is not a fault of the language that the application is slow or unresponsive. It is always fault of the programmers or user who is running the app on a hardware below minimum requirements for the app.
Many times I heard claim "if it was written in C++, it would run faster". Yeah, probably it would be 20% faster but 90% less functional.

And this is the case with IDEs. Java IDEs have higher requirements, but are much more functional. This is really funny that Java IDEs like Eclipse CDT got so huge popularity even in C++ world and can rival Visual Studio or QTCreator. And that even regardless of the fact that they are much less functional for C++ than they are for Java, and that C++ support was never a top priority, and seriously - it sucks. If Eclipse or Idea had such great support for C++ as they have for Java, noone would ever seriously cosider VS or CodeBlocks. That is why no Java IDE written in C++ ever got any serious attention.


Java is a language for those who find C++ hard


C++ is for kids who *think* using a complex language makes them look guru hackers to the rest of the world. :D


In that post in the forum, it's not fair at all to use an opensource compiler vs a commercial compiler


Huh? Where did I mention a commercial compiler? Oracle JVM is opensource.
Last edited on
rapidcoder wrote:
Oh, do it for you:
http://www.cplusplus.com/forum/unices/64290/


Actually there are various reasons why those benchmarks are not very good, mainly because the java benchmarks are contrived so that they don't measure DEALLOCATION times, whereas the C++ benchmarks measure both allocation AND deallocation. Also there are differences in that Java is not copying like C++ is.

If you examine those benchmarks closely you will see that C++ greatly outperforms Java when doing the *same job*.

The reason I didn't bother addressing the issues in the other thread is because this is a C++ forum, not your personal Java trolling platform.

And with respect to eclipse I love it, but it is sluggish in a way that native C++ apps never are.

Actually there are various reasons why those benchmarks are not very good, mainly because the java benchmarks are contrived so that they don't measure DEALLOCATION times


Huh. There is *no* such thing like object deallocation in Java. Neither in the language, nor internally in the JVM. Cost of a no-op is 0. And if you meant the GC time, it *is* included in those tests. If GC was not run, the test would quickly run out of free memory, go to swap and be slow as molasses.


Also there are differences in that Java is not copying like C++ is.


Not copying what? Both are appending *pointers* to strings. If I compared it to C++ *copying* the strings, it would lose much more than this. The closest in functionality are shared_ptrs, but in that case C++ loses even more in performance to Java, and this without even thinking about making that code *thread safe*.



If you examine those benchmarks closely you will see that C++ greatly outperforms Java when doing the *same job*


They are doing the same job. They are appending string pointers to a vector. If I were picky, I'd say C++ is doing here even less - because C++'s pointers are not so automated like Java's and keeping pointers in containers is much more error-prone in C++ than it is in Java.
Last edited on
Your C++ mark is not appending pointers it is appending reference-counted objects. By moving the action into functions you also force C++ to allocate/deallocate. Furthermore in your C++ code you are creating a new copy of the string and storing the pointer to the copy but in your Java test you store a pointer to the same string over and over again.

So they are not at all doing the same job.
1
2
3
std::shared_ptr<std::string> sp(new std::string("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
for(size_t i = 0; i < COUNT; ++i)
  v.push_back(sp);


Where do you see a copy of the string?

Anyway, even when not using shared_ptrs, but raw pointers instead:

1
2
3
std::string* sp = new std::string("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
for(size_t i = 0; i < COUNT; ++i)
  v.push_back(sp);


Where do you see a string copy here? I'm storing the same pointer again and again, exactly as in the Java version. This code is still over 2x slower than Java.


Your C++ mark is not appending pointers it is appending reference-counted objects


This is not my fault an equivalent of a Java pointer is a reference-counted object in C++, well, almost equivalent, because it can't handle reference cycles. Anyway, C++ is losing this benchmark even when using raw pointers, which you should really avoid in programs written the "modern C++ way". It was discussed many times storing raw pointers in STL containers is a *bad idea*.


By moving the action into functions you also force C++ to allocate/deallocate.


Are you saying C++ can't optimise function calls? Oh. (Seriously I think you are underestimating your compiler this time) :D

C++ lost this benchmark because STL vectors are slower to append than Java's ArrayLists. And they are slower to append because of reallocation which is much more costly in C++. Run this under profiler and see where the most time is spent - it is inside push_back.
Last edited on
Pages: 12