Skip to content

Commit

Permalink
Update release notes wrt #342
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 21, 2022
1 parent 3a6fec9 commit f1b5b75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 39 deletions.
5 changes: 5 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,8 @@ Dominik Broj (thetric@github)

#341: (ion) Update to Amazon Ion 1.9.5
(2.14.0)

Brian Harrington (brharrington@github)

* Contributed #342: (smile) Possible performance improvement on jdk9+ for Smile decoding
(2.14.1)
5 changes: 5 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Active maintainers:
=== Releases ===
------------------------------------------------------------------------

2.14.1 (not yet released)

#342: (smile) Possible performance improvement on jdk9+ for Smile decoding
(contributed by Brian H)

2.14.0 (05-Nov-2022)

#301: (cbor, smile) Missing configuration methods for format-specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ private Feature(boolean defaultState) {
* Flag to indicate if the JDK version is 11 or later. This can be used in some methods
* to choose more optimal behavior. In particular, jdk9+ have different internals for
* the String class.
*
* @since 2.14.1
*/
private static final boolean JDK11_OR_LATER;
static {
Expand Down Expand Up @@ -1571,26 +1573,6 @@ private final String _decodeShortAsciiName(int len) throws IOException
final byte[] inBuf = _inputBuffer;
int inPtr = _inputPtr;

// 29-Mar-2021, tatu: Still true with Java 8 / Jackson 2.13: unrolling
// does NOT appear to help here (no change, for jvm-benchmarks test,
// probably since most of the time symbol table lookup is used
/*
for (int inEnd = inPtr + len - 3; inPtr < inEnd; ) {
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
}
switch (len & 3) {
case 3:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 2:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 1:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 0:
}
*/
for (int inEnd = inPtr + len; inPtr < inEnd; ++inPtr) {
outBuf[outPtr++] = (char) inBuf[inPtr];
}
Expand Down Expand Up @@ -2443,25 +2425,6 @@ protected final String _decodeShortAsciiValue(int len) throws IOException
final byte[] inBuf = _inputBuffer;
int inPtr = _inputPtr;

// 29-Mar-2021, tatu: Still true with Java 8 / Jackson 2.13: unrolling
// does NOT appear to help here -- slows things down by 5% (for one test)
/*
for (int inEnd = inPtr + len - 3; inPtr < inEnd; ) {
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
outBuf[outPtr++] = (char) inBuf[inPtr++];
}
switch (len & 3) {
case 3:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 2:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 1:
outBuf[outPtr++] = (char) inBuf[inPtr++];
case 0:
}*/

for (final int end = inPtr + len; inPtr < end; ++inPtr) {
outBuf[outPtr++] = (char) inBuf[inPtr];
}
Expand Down

0 comments on commit f1b5b75

Please sign in to comment.