Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38562
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2018-08-26 09:44 -0700 |
| References | <pjf7p5$mul$1@news.albasani.net> |
| Message-ID | <a015ddd6-0716-467d-9e4a-4dfef8939afd@googlegroups.com> (permalink) |
| Subject | Re: JDK 9 strings very slow |
| From | bursejan@gmail.com |
Is continues deduplication realized and now
part of Java? I read here a long concept with
a lot of alternatives:
JEP 192: String Deduplication in G1
http://openjdk.java.net/jeps/192
But if I follow the ticket JDK-8046182 it says
only closed/delivered without more specifics, and
forrest of further tickets.
But there might be no guarantee that for
example Android does the same deduplication
of runtime created strings, right?
Am Freitag, 27. Juli 2018 15:47:26 UTC+2 schrieb j4n bur53:
> I guess they are kidding:
>
> public static byte[] toBytes(int[] val, int off, int len) {
> byte[] ret = new byte[len];
> for (int i = 0; i < len; i++) {
> int cp = val[off++];
> if (!canEncode(cp)) {
> return null;
> }
> ret[i] = (byte)cp;
> }
> return ret;
> }
>
>
> So the above routine is run for every string,
> to check whether it can be latin encoded.
>
> But the routine does allocate a byte[len],
> and throws it away when it is not latin.
>
> Are there any benchmarks for these strings?
>
> http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/65464a307408/src/java.base/share/classes/java/lang/String.java
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-07-27 15:47 +0200
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-07-27 15:56 +0200
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-07-27 16:21 +0200
Re: JDK 9 strings very slow Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-07-27 10:11 -0400
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-07-27 16:23 +0200
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-07-27 16:25 +0200
Re: JDK 9 strings very slow bursejan@gmail.com - 2018-08-26 09:44 -0700
Re: JDK 9 strings very slow Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-08-26 16:36 -0400
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-08-26 23:33 +0200
Re: JDK 9 strings very slow Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-08-27 10:31 -0400
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-08-27 19:01 +0200
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-08-27 19:17 +0200
Re: JDK 9 strings very slow Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-08-27 13:32 -0400
Re: JDK 9 strings very slow bursejan@gmail.com - 2018-08-27 10:49 -0700
Re: JDK 9 strings very slow bursejan@gmail.com - 2018-08-30 18:56 -0700
Re: JDK 9 strings very slow bursejan@gmail.com - 2018-08-31 00:29 -0700
Re: JDK 9 strings very slow j4n bur53 <janburse@fastmail.fm> - 2018-08-31 09:56 +0200
csiph-web