# jackson-benchmarks **Repository Path**: mirrors_FasterXML/jackson-benchmarks ## Basic Information - **Project Name**: jackson-benchmarks - **Description**: Project that contains JMH-based micro-benchmarks to help with optimizations - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: 2.x - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Overview This project contains simple set of performance micro-benchmarks, using excellent [JMH](http://openjdk.java.net/projects/code-tools/jmh/) package. # Status Has been used since Jackson 2.4 to track performance changes: see various `results-pojo-2.x-home.txt` files for numbers. ## Usage Tests usually run with run-mediaitem.sh or directly with something like java -Xmx256m -jar target/microbenchmarks.jar ".*StdReadVanilla.*PojoMediaItem.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 (see `results-pojo-2.13-home.txt` and others for specific invocations used for each group of numbers) ## Profiling Can use ./profile-mediaitem.sh to use basic JMH settings over runs. ## Test sets ### POJO: MediaItem `MediaItem` POJO comes from: https://github.com/eishay/jvm-serializers tests suite. Test input generated is about 300 bytes as JSON, and between 200 and 500 bytes across other formats (converted from JSON which is considered canonical). Settings to run tests include: * Standard: java -Xmx256m -jar target/microbenchmarks.jar ".*StdReadVan.*PojoMedia.*" -wi 4 -w 1 -i 5 -r 1 -f 9 -t 1 * Afterburner: java -Xmx256m -jar target/microbenchmarks.jar ".*StdReadAfter.*PojoMedia.*" -wi 4 -w 1 -i 5 -r 1 -f 9 -t 1 ### POJO: Currency (floating-point (double)) `Currency` POJO, and data file `./json/USD.json` (about 2kB) come from [Awesome JSON Datasets](https://github.com/jdorfman/awesome-json-datasets#currency). Settings to run tests include: ``` * Default/JSON: java -Xmx256m -jar target/microbenchmarks.jar ".*JsonStdReadVanilla.readCurrencyPojoDefault.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 * FastFP/JSON: java -Xmx256m -jar target/microbenchmarks.jar ".*JsonStdReadVanilla.readCurrencyPojoFast.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 * All: java -Xmx256m -jar target/microbenchmarks.jar ".*StdReadVanilla.readCurrencyPojo.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 ``` ### POJO: Currency (BigDecimal) Same as above, but instead of reading as `double` values are read as `BigDecimal`. Run using ``` * Default/JSON: java -Xmx256m -jar target/microbenchmarks.jar ".*JsonStdReadVanilla.readCurrencyBigDefault.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 * FastFP/JSON: java -Xmx256m -jar target/microbenchmarks.jar ".*JsonStdReadVanilla.readCurrencyBigFast.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 * All: java -Xmx256m -jar target/microbenchmarks.jar ".*StdReadVanilla.readCurrencyBig.*" -wi 4 -w 1 -i 5 -r 1 -f 3 -t 1 ```