What is the performance of Shift Operation in Java
compared to C++
views:
164answers:
2
+5
A:
Generally speaking, if you think you're going to get significant performance differences in primitive operations between different languages, you're sadly mistaken, and if you think you need to re-write your app or part of your app in a different language to get better performance, the time would be better spent looking at your algoritms and data structures.
Paul Tomblin
2010-08-06 20:57:31
There is an exception to the advice above: If your code runs slower than your metrics require and careful investigation accompanied by the use of profiling tools leads you to conclude it is due to a limitation of the programming language. This is highly unlikely to happen in your particular case, and as Paul said usually your algorithm will be to blame when it comes to low level operations. However, this is not guaranteed to be the case.
Brian
2010-08-06 21:14:53
@Brian: True, but the differences between implementations of the same programming language may be bigger than the differences between different programming languages.
David Thornley
2010-08-06 21:16:40
A:
This seems like an easy question to answer with some profiling tools available in your favorite C++ and Java IDE's.
andand
2010-08-06 22:09:09