Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More efficient handling of different discriminator types (#771)
* Remove redundant de-aliasing of the discriminator field name * Fix code duplication * Remove handling of impossible -2 value for discriminator * Remove redundant wrapping into `RecordingReader` * Fix reported trace for error when parsing discriminator field value * Speed up scanning for the discriminator field * Remove support of more than 1 discriminator fields in JSON encoders * Speed up encoding of non-simple enums * Yet more efficient decoding of non-simple enums * Lesser allocations and hash map lookups when parsing enums * Use StringMatrix for enum decoding to reduce allocations and CPU usage * Avoid dynamic caching of JSON decoders based on a position of the discriminator field in parsed messages * Avoid negations of flags in the field parsing loop * Reorder the duplication check for less branch mis-predictions * Remove redundant negations and checks * Remove redundant checks for case classes with the discriminator field * Reduce accesses to the Lexer module references and the decoder cache in decode methods * Reformat
- Loading branch information