Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Method calling and performance  RSS feed

 
Francesco Marchioni
author
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'd like to hear your opinion about this:
What is the impact on the JVM when you choose
to call a method like this two:
1)
Object o;
mymethod(o); // Object gets modified in the method and then used.
2)
Object o = mymethod(); // Object is returned from the method and then used.
What yields better performance and less impact on the JVM ?
Thanks a lot
Francesco
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) doesn't work as written...
Besides that, I don't think it makes much of a difference.
What performance problem do you have?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!