...
The cited article also shows benchmarks from 2017 in which Jackson parser was out performing GSON in the large file category. We can surmise that there is a constant battle between these objectMappers and Jackson may begin out performing GSON again in the future. For example this article from 2019 with new benchmarks states that the difference between the different mappers is negligible, with Jackson mapper having a slight lead with larger files.
Test Results
Parser | ReadExecution time in microseconds | Issues | ||
---|---|---|---|---|
40 characters | Read 100 characters | Read 1000 characters | Issues | |
Jackson Read | 7.488 microseconds488 | 10.984 microseconds984 | 50.49 microseconds49 | |
GSON Read | 0.509 microseconds509 | 0.818 microseconds818 | 8.212 microseconds212 | GSON parses all numerical values to Doubles and as such it unable to dynamically allocate the object type that it is parsing |
Jackson Write | 0.296 microseconds296 | 0.567 microseconds567 | 5.12 microseconds12 | |
GSON Write | 0.531 microseconds531 | 1.332 microseconds332 | 14.884 microseconds |
Parser | Pros | Cons |
---|---|---|
Jackson | Consistent conversion of numerics | Slower Read |
GSON | Faster Reads | Converts numerics to Doubles |
...