Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: A third easy performance optimisation needed Date: Thu, 13 Jul 2017 19:58:12 +0200 Lines: 20 Message-ID: References: <87d1946ab3.fsf@munus.decebal.nl> <87wp7c4gxi.fsf@munus.decebal.nl> <4349fcfb-e1d4-4474-bc4d-9003d2fafeea@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net H2GYbDaKURbFUTkQYLPJRgfdvd78QxEI9nzUOe8nXYJ4x/KcE= Cancel-Lock: sha1:Hxg6xssMxghvvlKzlPPfTzqId0g= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: <4349fcfb-e1d4-4474-bc4d-9003d2fafeea@googlegroups.com> Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:36905 On 13.07.2017 16:07, Eric Douglas wrote: > On Thursday, July 13, 2017 at 9:28:19 AM UTC-4, Cecil Westerhof wrote: >> As said there: for class and methods it can be wrong, but I am talking >> about variables. And there it can make a difference. I one case code >> takes 3 minutes without final and 18 seconds with final. That is >> almost 17 times as fast. > > I would like to see the performance tests on that. Same here. And frankly, I doubt that declaration of final for a variable can make this difference - especially since in Java 8 some automatic final detection is done anyway. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/