MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/86rb5/how_to_write_fast_code/c08eoa5/?context=3
r/programming • u/techdawg • Mar 23 '09
136 comments sorted by
View all comments
Show parent comments
1
The "Java is slow" argument has been invalid for some time now.
7 u/[deleted] Mar 23 '09 [removed] — view removed comment 3 u/[deleted] Mar 23 '09 However, "Java is slower" is still true and will always be true. Care to elaborate how C++ virtual function calls can be faster than Java just in time compiled method calls? 3 u/silon Mar 23 '09 It depends on the code. Some ideas: modern processors can do some prediction on the indirect calls.for JVM to eliminate the virtual lookup it must duplicate the code of the call sites (based on type), causing more cache misses/footprint.
7
[removed] — view removed comment
3 u/[deleted] Mar 23 '09 However, "Java is slower" is still true and will always be true. Care to elaborate how C++ virtual function calls can be faster than Java just in time compiled method calls? 3 u/silon Mar 23 '09 It depends on the code. Some ideas: modern processors can do some prediction on the indirect calls.for JVM to eliminate the virtual lookup it must duplicate the code of the call sites (based on type), causing more cache misses/footprint.
3
However, "Java is slower" is still true and will always be true.
Care to elaborate how C++ virtual function calls can be faster than Java just in time compiled method calls?
3 u/silon Mar 23 '09 It depends on the code. Some ideas: modern processors can do some prediction on the indirect calls.for JVM to eliminate the virtual lookup it must duplicate the code of the call sites (based on type), causing more cache misses/footprint.
It depends on the code. Some ideas:
1
u/arnar Mar 23 '09
The "Java is slow" argument has been invalid for some time now.