-
-
Notifications
You must be signed in to change notification settings - Fork 816
Open
Description
This is a more specific follow-up from one of the components of FasterXML/jackson-benchmarks#6
I'd like to determine whether this comment still holds true, initial benchmarking showed a fairly substantial improvement for small inputs, and the UTF8StreamJsonParser
has optimizations outside of keys that I'd expect to tip the scales in its favor.
jackson-core/src/main/java/com/fasterxml/jackson/core/json/ByteSourceJsonBootstrapper.java
Lines 259 to 270 in 36cd882
if (enc == JsonEncoding.UTF8) { | |
/* and without canonicalization, byte-based approach is not performant; just use std UTF-8 reader | |
* (which is ok for larger input; not so hot for smaller; but this is not a common case) | |
*/ | |
if (JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(factoryFeatures)) { | |
ByteQuadsCanonicalizer can = rootByteSymbols.makeChild(factoryFeatures); | |
return new UTF8StreamJsonParser(_context, parserFeatures, _in, codec, can, | |
_inputBuffer, _inputPtr, _inputEnd, bytesProcessed, _bufferRecyclable); | |
} | |
} | |
return new ReaderBasedJsonParser(_context, parserFeatures, constructReader(), codec, | |
rootCharSymbols.makeChild(factoryFeatures)); |
cowtowncoder
Metadata
Metadata
Assignees
Labels
No labels