• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Urban performance legends" article

 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very interesting read: http://www-106.ibm.com/developerworks/java/library/j-jtp04223.html?ca=dgr-lnxj01JavaUrbanLegends
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem with that article is that he has not actually performed any testing with different jdks.
I mean,
Urban performance legend #2: Declaring classes or methods final makes them faster

How long does it take to perform some simple tests with JDK 1.1 thru 1.4??
I've done this before (in fact when a new JDK comes out the first thing I do is test it - not RTFM). Yea in JDK 1.4 it makes no difference, but 1.3 and before its a whole heap slower.
A useless article.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Simon on this one. We had a lot of discussions in here and ran lots of peformance comparisons that showed that final methods do run faster prior to 1.4 because they were inlined. 1.4 is much smarter and inlines as soon as it realizes that a method has not been overridden (as compared to can not be overridden).
We had a pretty good discussion on this a little while back:
http://www.coderanch.com/t/201812/Performance/java/Making-everything-compiler-allows-final
[ June 17, 2003: Message edited by: Thomas Paul ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, the article is not totally correct on the final keyword. I don't see how this makes the article totally useless, though.
Especially the "Lessons learned" section is very good, I'd think.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!