jackson-dataformats-binary icon indicating copy to clipboard operation
jackson-dataformats-binary copied to clipboard

(EXPERIMENTAL) Fix #624: try to use more efficient String constructor

Open cowtowncoder opened this issue 1 month ago • 2 comments

cowtowncoder avatar Oct 26 '25 03:10 cowtowncoder

Oddly does not seem to speed up jackson-benchmarks CBOR test (in fact, ~5% slow down).

Maybe new String(byte[], int, int, Charset) not more optimal or... need to do some profiling I suppose.

cowtowncoder avatar Oct 26 '25 03:10 cowtowncoder

Oh. I suspect JDK uses fast method:

byte[] bytes = StringLatin1.encode(chars, 0, chars.length);

to handle conversion.

cowtowncoder avatar Oct 26 '25 03:10 cowtowncoder