Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

(I am asking this from a low latency perspective, but I guess the question applies in normal business domains).

I am deciding whether to try and specialise in C++ or Java for low latency.

My issue is as the Hotspot JVM and the JIT improve, will the need for excellent Java developers to write fast code die? In the future "average" Java code could be interpreted by the JIT and transformed into very fast Java code.

I worry that by specialising in Java (as opposed to C++), in a few years time the JVM and JIT will be so amazing that it could take away the skill required on behalf of the Java programmer?

The Intel C++ compiler may be good, but I feel there will still always be a significant emphasis on the programmer to write fast code.

share|improve this question
14  
Were Java developers ever important? ;P –  Yannis Rizos Apr 27 '12 at 22:50
1  
@YannisRizos hahaha, I'm a Java developer, that was cruel but made me laugh my ass off. –  Cristian Apr 27 '12 at 22:51
1  
Why would you worry that a Java (JIT) compiler would make a programmer obsolete, but not a C++ compiler? It doesn't make much sense, my friend... –  Max Apr 28 '12 at 0:25
    
What do you mean by "low latency"? –  user1249 Apr 28 '12 at 3:42
    
In normal business domains the execution speed of Java code has average importance, because requirements change often and your work has to be quick and cheap. You spend more time designing, changing your code and database for the new requirements than to optimize some code that you have already written. –  Vitalij Zadneprovskij Apr 28 '12 at 11:35
add comment

closed as primarily opinion-based by ChrisF Mar 13 at 10:26

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

up vote 4 down vote accepted

No, there is absolutely no way this is going to happen. The JIT can never improve your algorithms- they're the biggest optimization chunk.

Compiler optimizations are important but they can never supplant optimizations done by the human programmer.

Not that Java was ever important :)

share|improve this answer
add comment

The JIT compiler can only do so much (especially as the JVM doesn't support value types and some other 'get really close to hardware' constructs)and it is still up to the Java developer to layout their code in such a manner to:

  1. Take advantage of JIT, e.g. methods of < 35 bytecodes will generally be inlined
  2. Adhere to "Mechanical Sympathy" (A term coined by Martin Thompson, creator of the low-latency Disruptor framework), that is, know how the JVM maps Java code --> byte code --> machine code --> actually O/S and hardware.

This is non-trivial to say the least and the Java developer will definitely need to know what they're doing for some time yet to come. :-)

share|improve this answer
add comment

There's a whole lot more to being an excellent developer (in Java or any other language) than just knowing fast algorithms. So this one aspect of development may become less important (although somehow I doubt it); but all the other attributes that make up excellent development skills won't.

share|improve this answer
add comment

Developers, of whatever language, will have to worry about being replaced by the speed of compiler-optimized code sometime after they have to worry about being replaced by the functionality of code generator-generated code.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.