Base64 #182
Replies: 1 comment
-
@magicprinc One reason is that Jackson codec needs to support variants (different char set, linefeeds etc); does JDK Codec support these? Also back in the day no codec was available (since it was introduced in Java 8 and jackson-core required only Java 6 until fairly recently). And in general "if it ain't broke don't fix it". So speed up would need to be measurable for end-to-end use case (that is, as used for JSON read/write, not just for isolated base64 encoding test), to be a driver for replacing existing code with JDK one. Having said that: as long as base64 codec is available on JDK 8 and can be seen to perform as well as (or better than) existing implementation, I would be open to someone doing PR for using it. |
Beta Was this translation helpful? Give feedback.
-
Jackson has its own implementation of base64 encoding/decoding.
My non-scientific tests (without JMH, but with warm-up and black hole) show me that JDK variant is sometimes 45% faster.
Why not to use standard JDK Base64 ?
PS: Vert.x overrides Jackson default base64 serialization/deserialization
eclipse-vertx/vert.x#4086
Beta Was this translation helpful? Give feedback.
All reactions