Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: A third easy performance optimisation needed Date: Thu, 13 Jul 2017 20:02:49 +0200 Organization: Decebal Computing Lines: 21 Message-ID: <871spk43li.fsf@munus.decebal.nl> 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 Injection-Info: mx02.eternal-september.org; posting-host="cea988b749795bfe5e66959d383985c6"; logging-data="18829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/f1pm/J/bXxVtrn8wtg0pFpGSLaMLktGo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:3uHLpL4m53NDj4a2Q3crRFdSyUc= sha1:pEGHTRtXUWaW6TngwuNhIHq/eNU= Xref: csiph.com comp.lang.java.programmer:36908 Robert Klemme writes: > 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. I will post something this weekend. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof