FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
314 stars 136 forks source link

Optimize `IonParser.getNumberType()` using `IonReader.getIntegerSize()` #212

Closed cowtowncoder closed 4 years ago

cowtowncoder commented 4 years ago

Current implementation of getNumberType() is bit inefficient as it forces creation of BigInteger, checks, and it looks like IonReader actually has method to help with that (not sure when it was added but seems to be included in 1.4.0 of ion-java).

cowtowncoder commented 4 years ago

@mcliedtke Created this issue (as I had to add a minor thing in master for 3.0 of JsonParser impl), seems like easy to improve, but not sure when I have time to tackle.