Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30292

Re: Java 7 vs 8 speed issues on Win7?

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 <janburse@fastmail.fm>
Newsgroups comp.lang.java.programmer
Subject Re: Java 7 vs 8 speed issues on Win7?
Date Thu, 06 Nov 2014 15:09:33 +0100
Organization albasani.net
Lines 59
Message-ID <m3fvet$ko3$1@news.albasani.net> (permalink)
References <m28osf$b1i$1@dont-email.me> <ac6k5ahi1h95romsnq52kus20rvbi3psel@4ax.com> <m3ditj$8bd$1@dont-email.me> <m3dus5$q4d$1@news.albasani.net> <m3ej2t$9ae$1@dont-email.me> <m3emtc$bd2$1@dont-email.me> <m3erpb$qt5$1@dont-email.me> <m3etjs$b9$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net hxJ5hegQ8RKf4LhCRuB28uyUTT2Dm5Swru7BFjjDi+UsbkrFKVs3+deTLizUuhx15IDVNmztePT9D9ccLcmBQw==
NNTP-Posting-Date Thu, 6 Nov 2014 14:09:33 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="rMRjVllr5fisPSSq0dKj/yZa9puynmoBT8QtaEDbDRXJm0qh1LxPiYs7/jETnduMYWGPBvjNcyhCDoAoPQZpZNGPTTDDWshrLJei3S6q5s3tvZfEVA/kCRlE9FRu2vF4"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30
In-Reply-To <m3etjs$b9$1@dont-email.me>
Cancel-Lock sha1:zyRgY4fSt6PpGVsucQ/dtIYDwJ8=
Xref csiph.com comp.lang.java.programmer:30292

Show key headers only | View raw


Hi,

Eric Sosman schrieb:
>      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.

I don't think a method signature (=contract) alone
defines any semantics. BTW: There was a thread here on 
comp.lang.java.programmer about the changed semantics
of substring(int,int). One can lookup the results there.

HashMap was mentioned already in this thread, but I think
it was also discussed here before. String deduplication is
also already mentioned, but this has to be activated by 
-XX:+UseStringDeduplication I guess. Maybe there is
somewhere a list of all the differences.

I know about some existing applications that had problem
cz of the substring(int,int) change, in particular a
parser that relied on the semantics that substring(int,int)
does share the original char[] array. But this semantics
has been replaced by another semantics now, where a range
of the char[] array is copied.

Bye

That the semantic has changed can also be seen by the
fields that the String class now features (JDK 8):

     private final char value[];
     private int hash;

(See for example:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/lang/String.java 
)

The field offset and count is now gone. The old
String class featured the following fields (for example
JDK 6):

     private final char value[];
     private int hash;
     private final int offset;
     private final int count;

(See for example:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java 
)

So the internal contract has massively changed.





Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Java 7 vs 8 speed issues on Win7? Knute Johnson <eternal@knutejohnson.com> - 2014-10-22 10:18 -0700
  Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-10-24 11:10 +0200
  Re: Java 7 vs 8 speed issues on Win7? Roedy Green <see_website@mindprod.com.invalid> - 2014-11-05 04:36 -0800
    Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 08:23 -0800
      Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-05 20:47 +0100
        Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 17:32 -0800
          Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-05 21:37 -0500
            Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 20:00 -0800
              Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-05 23:32 -0500
                Re: Java 7 vs 8 speed issues on Win7? Robert Klemme <shortcutter@googlemail.com> - 2014-11-06 08:48 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 15:09 +0100
                Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-06 09:50 -0500
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 18:21 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 18:34 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 23:03 +0100
                Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-06 17:21 -0500
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-07 00:07 +0100
                Re: Java 7 vs 8 speed issues on Win7? "Bob(but not" THAĊ˘ "Bob)" <nobody@nowhere.net> - 2014-11-07 08:48 +0000
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-08 11:28 +0100
        Re: Java 7 vs 8 speed issues on Win7? Roedy Green <see_website@mindprod.com.invalid> - 2014-11-20 03:12 -0800
          Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-11-20 13:24 +0100
            Re: Java 7 vs 8 speed issues on Win7? Robert Klemme <shortcutter@googlemail.com> - 2014-11-20 19:06 +0100
              Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-11-20 22:54 +0100
                Re: Java 7 vs 8 speed issues on Win7? Brixomatic <brixomatic@yahoo.com> - 2014-11-22 08:54 +0100
                Re: Java 7 vs 8 speed issues on Win7? Brixomatic <brixomatic@yahoo.com> - 2014-11-22 09:19 +0100
    Re: Java 7 vs 8 speed issues on Win7? Fredrik Jonson <fredrik@jonson.org> - 2014-11-29 07:44 +0000

csiph-web