All Projects → arey → Java Object Mapper Benchmark

arey / Java Object Mapper Benchmark

JMH benchmark of Java object-to-object mapping frameworks

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Java Object Mapper Benchmark

Train Ticket
Train Ticket - A Benchmark Microservice System
Stars: ✭ 180 (-20.7%)
Mutual labels:  benchmark
Fleetx
Paddle Distributed Training Extended. 飞桨分布式训练扩展包
Stars: ✭ 196 (-13.66%)
Mutual labels:  benchmark
Automlbenchmark
OpenML AutoML Benchmarking Framework
Stars: ✭ 210 (-7.49%)
Mutual labels:  benchmark
Sangrenel
Apache Kafka load testing "...basically a cloth bag filled with small jagged pieces of scrap iron"
Stars: ✭ 180 (-20.7%)
Mutual labels:  benchmark
Tracerbench
Automated Chrome tracing for benchmarking.
Stars: ✭ 189 (-16.74%)
Mutual labels:  benchmark
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (-12.33%)
Mutual labels:  benchmark
Gbm Perf
Performance of various open source GBM implementations
Stars: ✭ 177 (-22.03%)
Mutual labels:  benchmark
Turbo Run Length Encoding
TurboRLE-Fastest Run Length Encoding
Stars: ✭ 212 (-6.61%)
Mutual labels:  benchmark
Blue Team
Blue Team Scripts
Stars: ✭ 190 (-16.3%)
Mutual labels:  benchmark
Indonlu
The first-ever vast natural language processing benchmark for Indonesian Language. We provide multiple downstream tasks, pre-trained IndoBERT models, and a starter code! (AACL-IJCNLP 2020)
Stars: ✭ 198 (-12.78%)
Mutual labels:  benchmark
Gotemplatebenchmark
comparing the performance of different template engines
Stars: ✭ 180 (-20.7%)
Mutual labels:  benchmark
Ann Benchmarks
Benchmarks of approximate nearest neighbor libraries in Python
Stars: ✭ 2,658 (+1070.93%)
Mutual labels:  benchmark
Filecoin
CoinSummer实验室Filecoin资源分享。
Stars: ✭ 191 (-15.86%)
Mutual labels:  benchmark
Jmh Visualizer
Visually explore your JMH Benchmarks
Stars: ✭ 180 (-20.7%)
Mutual labels:  benchmark
Gymfc
A universal flight control tuning framework
Stars: ✭ 210 (-7.49%)
Mutual labels:  benchmark
Tsung
Tsung is a high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc.
Stars: ✭ 2,185 (+862.56%)
Mutual labels:  benchmark
Openvqa
A lightweight, scalable, and general framework for visual question answering research
Stars: ✭ 198 (-12.78%)
Mutual labels:  benchmark
Dbtester
Distributed database benchmark tester
Stars: ✭ 214 (-5.73%)
Mutual labels:  benchmark
Turbobench
Compression Benchmark
Stars: ✭ 211 (-7.05%)
Mutual labels:  benchmark
Glmark2
glmark2 is an OpenGL 2.0 and ES 2.0 benchmark
Stars: ✭ 199 (-12.33%)
Mutual labels:  benchmark

Object-to-object mapping framework microbenchmark

CI

Multi-layered applications often require to map between different object models (e.g. DTOs and entities). Writing such boiler plate mapping code is a tedious and error-prone task. A lot of object-to-object mapping Java frameworks aims to simplify this work and automate it. Some uses code instrospection (eg. Dozer). Other uses code generation (ex: MapStruct). This micro-benchmark compares performance of 8 frameworks. Results could be compared to the benchmark of a code written manually.

Benchmark are powered by a tool called JMH or also known as "Java Microbenchmarking Harness". JMH is developed by the OpenJDK team.

Benchmarked object to object mapper frameworks

Contributing to benchmark

Github is for social coding platform: if you want to add another mapping framework or optimize an existing one, we encourage contributions through pull requests from forks of this repository. If you want to contribute code this way, please reference a GitHub ticket as well covering the specific issue you are addressing. To add a new mapper, please add a unit test that extends the AbstractMapperTest class and declare your mapper into the MapperBenchmark class.

Data model

The data model used by this benchmark is very basic. It comes from the Comparison class from the ModelMapper framework. It includes combinations which usually appear in Java Beans, such as:

  • Object types
  • Collections

Data model UML diagram

Launch the benchmark

Pre-requisites: Maven 3.x and a JDK 8 (or above)

git clone git://github.com/arey/java-object-mapper-benchmark.git

mvn clean install

java -jar target/benchmarks.jar

Optional: To run a single benchmark, such as MapStruct, use java -jar target/benchmarks.jar -p type=MapStruct

Interpreting the Results

The benchmarks measure throughput, given in "ops/time". The time unit used is seconds. Generally, the score represents the number of graph object mapped per second; the higher the score, the better.

Results

Tests has been performed on:

  • OS: macOS High Sierra
  • CPU: 3.1 GHz Intel Core i7, 2 cores, L2 Cache (per Core): 256 KB, L3 Cache: 4 MB
  • RAM: 16 GB 1867 MHz DDR3
  • JVM: Oracle 1.8.0_74-b02 64 bits
Benchmark Mode Samples Score Margin error (+/-) Units
Manual thrpt 200 26 978 437 615 002 ops/s
MapStruct thrpt 200 28 039 597 199 255 ops/s
Selma thrpt 200 27 518 789 238 602 ops/s
JMapper thrpt 200 24 531 754 123 945 ops/s
Orika thrpt 200 4 565 378 24 947 ops/s
ModelMapper thrpt 200 184 304 12 777 ops/s
Dozer thrpt 200 89 860 462 ops/s
BULL thrpt 200 178 027 679 ops/s
datus thrpt 200 8 230 775 59 673 ops/s

Framework Comparison

Documentation

Generating plot

  1. Run benchmark while exporting results to csv with java -jar target/benchmarks.jar -rff results.csv -rf csv
  2. Use gnuplot to generate plot with gnuplot benchmark.plt. This will output results.png.

Credits

  • Uses Maven as a build tool
  • Uses JMH for Java Microbenchmarking Harness
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].