Vector.push_back pass by reference or value?

Pages: 12

Java is not improving, what is improving is the hardware


Not true. Java made a huge (> 10x) progress in performance since version 1. There are still many optimisations being worked on, so more is expected to come up. Most of the optimisations used by C++ compilers are already implemented and now they are exploring things that a static compiler can never do. I'd expect more cases where it is extremely hard to get C++ up to performance of Java and even if you manage to outperform it, you are very unlikely to get more than a few % faster code. Not worth the money.


The unique reason big companies are using Java developers currently is because of money and productivity


Yeah - productivity is more than 3x higher and there is virtually no performance loss. So the choice is obvious.


And you thing they're handling all that in just one computer/server..


That makes it only worse for C++, because writing distributed / multithreaded software in C++ is a big pain. And esentially if they have so many servers, they really need to get the top performance out of them. Keeping a big farm of servers costs *lots of bucks*. If they needed 3x as many Java servers as it is needed C++ servers, they would never consider Java. But you can claim they are idiots. Good luck.

By the way - actually someone already tried to create in C++ a fast distributed database engine similar to that used by Amazon/Google/Facebook. It is called HyperTable. The creators made usage of C++ and performance advantage their main selling point. That was the wrong move. They failed miserably:

http://www.indeed.com/jobtrends?q=hypertable%2C+cassandra%2C+hbase%2C+hadoop&l=

If C++ offered 10x performance improvement as it was 15 years ago, it would be a diffferent story. But it doesn't now and C++ programmers have to search for other features than performance to sell their products. You see, it really doesn't make any impression on anyone if your software is doing only 10% faster than the competition. And this only until heap fragmentation or memory leak gets in and your performance advantage is screwed up anyway...

---------------

I think we should end up this discussion here, because we are way off topic now.
Last edited on
Not true. Java made a huge (> 10x) progress in performance since version 1.


Hahahaha it seems very similar to the hardware progress since Java 1... I wonder why... If Java hadn't progressed 10X since Java 1, it wouldn't exist right now... When Java was a shit, C was a real good and fast language, and now that Java is more or less acceptable C++ (extension of C) still being a very good and fast language.

Yeah - productivity is more than 3x higher and there is virtually no performance loss. So the choice is obvious.


Yhea, C++ will always loose the battle in productivity terms. It's a programming language not meant to everybody, very difficult to get actually. And if you compare the speed of a Java program running on a Intel i7 and a C++ program running on a Pentium III, you might not notice the difference depending on the application. Now take a C++ program running on a Intel i7 and a Java program running on a Pentium III... The difference is obvious.

That makes it only worse for C++, because writing distributed / multithreaded software in C++ is a big pain.


Depends if you're a newbie or not...

If they needed 3x as many Java servers as it is needed C++ servers, they would never consider Java.


... Ok man... PCs are a loooot cheaper than programmers are, I would rather pay a programmer 2.200€/moths and buy 3 PCs than pay 4.200€/months and buy just one PC... I told you, Java is about money and productivity, not about speed.

But it doesn't now and C++ programmers have to search for other features than performance to sell their products. You see, it really doesn't make any impression on anyone if your software is doing only 10% faster than the competition. And this only until heap fragmentation or memory leak gets in and your performance advantage is screwed up anyway


Well, again, I'm not talking about marketing here... I use to program C++ very naturally... In the other hand I have seen a lot of people in trouble when programming even when they're using Java. No memory leaks, no errors, no bugs... I use to program all days and I don't see those. But yhea, Java is 3X easier, but isn't faster than C++, sorry if you wanted to think that way.

I think we should end up this discussion here, because we are way off topic now.


Yhea is true... The guy who made this thread must be thinking: "What the hell?!". :D

Hahahaha it seems very similar to the hardware progress since Java 1.


I meant 10x improvement on the same hardware. If I accounted for hardware improvement, it would be like 100x or more. Old Java was interpreted, now it is compiled and optimised just as C++.


Depends .if you're a newbie or not...

... Ok man... PCs are a loooot cheaper than programmers are, I would rather pay a programmer 2.200€/moths and buy 3 PCs than pay 4.200€/months and buy just one PC... I told you, Java is about money and productivity, not about speed.


And here you are only saying you haven't got a slightest idea about big throughput business like Amazon , Facebook or Google. First, they don't hire newbies. Actually they are companies it is hardest to get into. Second, cost of keeping 3x as many servers is *not* just buying 3 times more PCs. Give such idea to any Google developer and he would just ROTFL.


but isn't faster than C++


I never claimed it to be much faster. Sometimes it is faster, sometimes it is slower. The differences are similar to that between various C++ compilers.


No memory leaks, no errors, no bugs...

This statement disqualifies you as a professional programmer. So you are a newbie. I knew it!
This statement disqualifies you as a professional programmer. So you are a newbie. I knew it!


Tell it to my team...
Oh yeah, in Internet you can write *anything*. :D
EOT from my side.
Last edited on
This is very entertaining to read
Topic archived. No new replies allowed.
Pages: 12