Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Java 7 vs 8 speed issues on Win7? Date: Wed, 05 Nov 2014 23:32:01 -0500 Organization: A noiseless patient Spider Lines: 72 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 6 Nov 2014 04:31:56 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JBWXmSndlcC/X2ZTtVhIi" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:AdXyxeN4/x5hLa+SKzinhUfue1E= Xref: csiph.com comp.lang.java.programmer:30290 On 11/5/2014 11:00 PM, Knute Johnson wrote: > On 11/5/2014 18:37, Eric Sosman wrote: >> On 11/5/2014 8:32 PM, Knute Johnson wrote: >>> On 11/5/2014 11:47, Jan Burse wrote: >>>> A fundamental change in one of the newer JDKs >>>> is a changed semantics for substring(int, int). >>> >>> For better or worse? >> >> "Yes, probably." >> >> (Given the amount of data provided, that's really all the >> answer one can offer -- and all that's deserved. C'mon, Knute: >> No description of the application, no hint about its hot spots, >> no profiling data, not even *one* measurement of any kind at >> all ... How in the world can you expect useful feedback when >> you've not fed forward?) >> > > I think we are talking about two different things here. > > Unfortunately I can't give any good details because I was working on > this 250 miles away with VNC. The customer had a failed computer and we > had to get it running without any delays. Yes, sometimes in a crisis there's no opportunity for calm investigation. I can quite understand that; I've been in those situations myself. Nonetheless, the complete lack of measurement means you can't expect a diagnosis that's any better than pure speculation. It's a casualty of the crisis. > It is not code that was stretching the previous machine with a single > processor running XP and Java 6 but when we configured a new computer > with a multi-core processor, Win7 and Java 7 the code barely ran. It > was so slow that it was no longer usable. Put in Java 8 and it is back > to its old self, tuning along just fine. I haven't been able to > duplicate it in my shop and we can't stop the customer's computers to > play with them. So, all we have is: - An application (whose nature, function, size, and performance characteristics aren't divulged) performed acceptably on one machine with one O/S and one Java version, - When the Java version, O/S, and machine were all changed, the application performed poorly, - When the Java version was changed yet again, things improved. Three variables, two times two times three equals twelve configurations of which three were observed, and the only data we have from the observations are "it performed very poorly" and "the performance improved considerably." Anybody who can draw a diagnosis from so little data has psychic powers. > As to Jan's comments, there isn't a single call to String.substring() in > the code anywhere and it runs fine with Java 8, so I don't think that is > the cause. But I am still curious about what the "changed semantics" > are and how they might impact performance. I, too, wonder what he meant by "changed semantics," since as far as I know the contract of String#substring(int,int) has not changed since Java 1.0, and perhaps earlier. The underlying implementations have changed, I believe, but that's not what I'd call a "semantic" difference. -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM