Re: [11] RFR: 8181157: CLDR Timezone name fallback implementation

2018-04-23 Thread Naoto Sato
Hi Sherman, thanks for the review. On 4/23/18 1:06 PM, Xueming Shen wrote: Naoto, Here some comments (1) CLDRTimeZoneNameProviderImpl.java: Ln#58:  to use Stream.toArray(String[]::new) ? no sure which one is faster Ln#155-160: is it worth considering to check all possi

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Isaac Levy
On Mon, Apr 23, 2018 at 5:05 PM Xueming Shen wrote: > > I would assume in case of an exception thrown from > appendExpandedReplacement() we don't > want "text" to be pushed into the "sb". > > -sherman > Perhaps. Though the behavior under exception is undefined and this function is probably prima

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Isaac Levy
On Mon, Apr 23, 2018 at 5:18 PM David Lloyd wrote: > FWIW I strongly doubt this will improve performance; probably the > opposite in fact, as IIRC an enum switch generates an extra class > (though perhaps this has changed). The original code was quite > compact and utilized identity comparisons,

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread David Lloyd
FWIW I strongly doubt this will improve performance; probably the opposite in fact, as IIRC an enum switch generates an extra class (though perhaps this has changed). The original code was quite compact and utilized identity comparisons, and given there are only three alternatives it probably was

Re: [PATCH] Add compareToUnsigned to java.nio.*Buffer

2018-04-23 Thread Paul Sandoz
Hi Robert, Thanks. The addition of mismatch is reasonable. I am unsure about compareToUnsigned, since we are trying to be a conservative about what we add to Buffer. I’ll take a closer look but it may take a little while to get around to it. Would you mind logging a web bug and attaching your

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Xueming Shen
I would assume in case of an exception thrown from appendExpandedReplacement() we don't want "text" to be pushed into the "sb". -sherman On 4/23/18, 1:49 PM, Isaac Levy wrote: Thanks. Another small perf patch below -- maybe we can combine. Avoids a StringBuilder allocation: --- a/src/java.

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Isaac Levy
Thanks. Another small perf patch below -- maybe we can combine. Avoids a StringBuilder allocation: --- a/src/java.base/share/classes/java/util/regex/Matcher.java +++ b/src/java.base/share/classes/java/util/regex/Matcher.java @@ -993,13 +993,11 @@ public Matcher appendReplacement(StringBuilder

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Xueming Shen
this looks fine. -sherman On 4/23/18, 12:26 PM, Isaac Levy wrote: ping? Isaac On Wed, Apr 18, 2018 at 2:58 PM, Isaac Levy wrote: Hi, Minor improvement in readability (and probably perf) for Pattern. Switch is more consistent with the rest of the impl and the resulting tableswitch avoids

Re: [11] RFR: 8181157: CLDR Timezone name fallback implementation

2018-04-23 Thread Xueming Shen
Naoto, Here some comments (1) CLDRTimeZoneNameProviderImpl.java: Ln#58: to use Stream.toArray(String[]::new) ? no sure which one is faster Ln#155-160: is it worth considering to check all possible empty slots in "names" here (from index_std_long to index_std_short?

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-23 Thread Isaac Levy
ping? Isaac On Wed, Apr 18, 2018 at 2:58 PM, Isaac Levy wrote: > Hi, > > Minor improvement in readability (and probably perf) for Pattern. Switch > is more consistent with the rest of the impl and the resulting tableswitch > avoids a comparison for possessives. > > -Isaac > > --- a/src/java.ba

Re: RFR of JDK-8201469,test under java/rmi should be restricted to not run concurrently

2018-04-23 Thread Paul Sandoz
Hi Hamlin, Do you have a sense of what rmi tests are problematic to run concurrently? Maybe you can subset to reduce the increased impact on execution time? Paul. > On Apr 20, 2018, at 12:21 AM, Hamlin Li wrote: > > Is someone available to review the following patch? > > Thank you > > -Haml

Re: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-23 Thread Simon Nash
Hi Goetz, It should be "out of bounds" without hyphens. Simon On 20/04/2018 11:03, Lindenmaier, Goetz wrote: Hi David, What about this: java.lang.ArrayIndexOutOfBoundsException: Arraycopy source index -1 out-of-bounds for double[10]. java.lang.ArrayIndexOutOfBoundsException: Arraycop

[PATCH] Add compareToUnsigned to java.nio.*Buffer

2018-04-23 Thread Robert Stupp
The proposed patch is an improvement for Byte/Short/Int/LongBuffer classes to add compareToUnsigned() that works like compareTo() but treats the values as unsigned to leverage the vectorized mismatch implementations, which are not publicly accessible. In addition to that, it adds mismatch() fo

[PATCH] Prefer TMPDIR over hard coded /tmp

2018-04-23 Thread Robert Stupp
For MacOS and Windows, Java prefers the user's temporary directory for java.io.tmpdir, but not for Linux, where it is always set to /tmp. The burden with this is that if you want to use a different temp directory, you have to explicitly pass -Djava.io.tmpdir=... on the command line, which can b

Re: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-23 Thread David Holmes
On 23/04/2018 5:08 PM, Lindenmaier, Goetz wrote: Hi, I still don't like the array type information - it's not relevant to the error IMHO. That aside, for the array copy cases I'd go for something like: arraycopy src index -1 out of bounds for double[10] arraycopy dest index -1 out of bounds f

RE: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-23 Thread Lindenmaier, Goetz
Hi Simon, I chose hyphens because they are used in other AIOOB messages, too. But others (including me) seem not to like them either, so I'll leave them out. Best regards, Goetz. > -Original Message- > From: Simon Nash [mailto:si...@cjnash.com] > Sent: Freitag, 20. April 2018 17:17

RE: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-23 Thread Lindenmaier, Goetz
Hi, > I still don't like the array type information - it's not relevant to the > error IMHO. > > That aside, for the array copy cases I'd go for something like: > > arraycopy src index -1 out of bounds for double[10] > arraycopy dest index -1 out of bounds for double[10] > arraycopy end src inde