GithubHelp home page GithubHelp logo

arey / java-object-mapper-benchmark Goto Github PK

View Code? Open in Web Editor NEW
284.0 17.0 52.0 438 KB

JMH benchmark of Java object-to-object mapping frameworks

Java 97.60% Gnuplot 2.40%
jmh dozer modelmapper benchmark mapstruct selma orika jmapper datus bull

java-object-mapper-benchmark's People

Contributors

arey avatar avurro avatar ekuvardin avatar fborriello avatar filiphr avatar mariombq avatar musikolo avatar xcasx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-object-mapper-benchmark's Issues

The unfair play from JMapper :)

JMapper benchmark does not implement mapping for customerName field.
There is also no appropriate test, that can reveal the issue.

P.S. PR for the fix is in progress.

Benchmarking more cases

The OrderFactory currently only returns one case which could be seen as the most "happiest" case: nothing is null which introduces several issues:

  • all the Mappers don't actually have to be implemented / defined in a null-safe manner. It's uncertain right now whether every implemented mapper is actually null safe (the tests don't cover that either). Each mappers null-safe declaration could also be way more verbose than it is right know which would skew the first impression how succinct / readable each mapping framework actually is in a nullable scenario
  • the performance characteristics of each mapper could be drastically different for "unhappy" cases e.g. every field that should be mapped is null

I would propose the OrderManager to return a List<Order> which contains a happy, unhappy and middle case which is iterated for each mapper. Each Mapper will suffer in its final score if it handles one of those cases poorly. Maybe use an Order[] instead of a List<Order> to avoid skewing the results by having to instantiate an Iterator<Order> in each benchmark call. An extended for-loop on an array desugars into an indexed based loop that won't impact the results as much

Upgrade Orika version and use BoundMapperFacade

The benchmarked version of Orika is old. The latest version supports a new BoundMapperFacade that brings substantial performance improvements.

A pull request addressing this issue is in the works.

Add advanced mapping features

Enhance the model with more advanced features: enum mapping, transcoding, String to numeric conversion ...
The complexity is to implement thoses new features for all existing mappers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.