Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: java8 up to 6x slower than java7 Date: Sat, 15 Feb 2014 12:26:49 +0100 Organization: albasani.net Lines: 23 Message-ID: References: <29a51a94-8f9a-41b1-980f-e8c13e2d11a2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net v0sCnNumfPdUWapU08/mA47J+vfsPhdW5elkWlQl29QvmSjr/bAbTU9qJtu6CY0jxYokLdFN6Vd/XaKzzxeTmw== NNTP-Posting-Date: Sat, 15 Feb 2014 11:26:54 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="SK3BdoMgBG9bUT3Egbv69VC+MWUa5ZelLoIkw4YFrfHJm2bCZve4Mw8t6OE5/9CkJ7Ck46qk0d1cOZgzJDeZjJdNPmmjYCyxnXci5DSHuvctNBLKWQPkoLDkbgYMfVu+"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 In-Reply-To: <29a51a94-8f9a-41b1-980f-e8c13e2d11a2@googlegroups.com> Cancel-Lock: sha1:Upg1DbS1bDTiedfZhGB0A613Ubc= Xref: csiph.com comp.lang.java.programmer:27513 Dennis Haupt schrieb: > i wrote a little pathfinder. i can run it under the jdk7 update 51 and it is done in ~20 seconds. under java8, since a long series of builds, a certain part involving deeeeeeeeeep recursion takes ~60 seconds instead of 10. > i suspected the hashmap change of java8 to be the culprit since i perform a lot of put operations, but that's not it - i used the standard hashmap from scala to be 100% sure the hashmap can't be the reason (or is), and indeed, i get the same performance difference between java7 and 8 with the same hashmap > my profiler (yourkit) shows that java8 spends a much bigger amount of time on garbage collection and allocated more objects. if i take a memory snapshot, can see that the final results are equal, so i have more temporary objects. yourkit also shows that more objects are allocated using java8. > what is up with that? > all i do in the critical method is creating arraylists and performing puts, contains and gets on a hashmap, and the recursive call. the time is, according to yourkit, spend in the method itself, not inside the hashmap or arraylist constructor. > any ideas? > I found that JDK 8 is more speedier than JDK 7, around 5% better, which is nice. But my testing might not be representative: Jekejeke Prolog Runtime on JDK 8 https://plus.google.com/103259555581227445618/posts/Mjw49qhBWku I didn't yet have a closer look to one of my apps. Usually I also look how the IDE behaves. But unfortunately IntelliJ IDEA 13 refuses to run under JDK 8 as of now. Didn't yet figure out how to start it with JDK 8. Compiling JDK 8 on the other works fine. Bye