{"id":5158,"date":"2014-03-30T19:16:49","date_gmt":"2014-03-30T19:16:49","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/does-marking-a-methods-arguments-as-final-makes-the-method-call-faster-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:16:49","modified_gmt":"2014-03-30T19:16:49","slug":"does-marking-a-methods-arguments-as-final-makes-the-method-call-faster-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/does-marking-a-methods-arguments-as-final-makes-the-method-call-faster-collection-of-common-programming-errors\/","title":{"rendered":"Does marking a method&#39;s arguments as final makes the method call faster?-Collection of common programming errors"},"content":{"rendered":"<p>It has zero impact on performance &#8211; indeed, it has no runtime effect at all.<\/p>\n<p>If you compile a class that contains 2 methods &#8211; one with the parameters marked as final, and the other without &#8211; and then look at the bytecode that gets generated for each method, you&#8217;ll note that there is no difference (other than the method name).<\/p>\n<p>All the <em>final<\/em> keyword does in this context is make it so that you cannot reassign that variable within the method.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has zero impact on performance &#8211; indeed, it has no runtime effect at all. If you compile a class that contains 2 methods &#8211; one with the parameters marked as final, and the other without &#8211; and then look at the bytecode that gets generated for each method, you&#8217;ll note that there is no [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5158","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5158"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5158\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}