This little project tests performance of mapping using Dozer and MapStruct. First it creates 1 000 000 objects "Worker" and than using each library maps it into "WorkerInfo" objects.
Running on my notebook:
- Intel® Core™ i7-3630QM CPU @ 2.40GHz × 8
- 16GB RAM
- SDD
- Ubuntu 15.10 (64-bit)
- Java(TM) SE Runtime Environment (build 1.8.0_72-b1)
INFO Main:36 - Preparing sample data...
INFO Main:43 - Done preparing sample data in 2.59300 seconds
INFO Main:61 - Start mapping with MapStruct...
INFO Main:68 - Mapping with MapStruct done in 3.51100 seconds
INFO Main:48 - Start mapping with Dozer...
INFO Main:56 - Mapping with Dozer done in 16.28200 seconds
mvn install exec:java -pl mapper -DskipTests
http://mariusz.wyszomierski.pl/en/mapping-dozer-vs-mapstruct/