Writing object to object mapper: my mapper vs AutoMapper
As my object to object mapper is now almost completed and I am sure it is good idea to stay on LCG (Lightweight Code Generation) I can now compare the performance of my mapper toAutoMapper.
- Using LINQ and reflection to find matching properties of objects
- Performance: Using dynamic code to copy property values of two objects
- Performance: Using LCG to copy property values of two objects
- Writing object to object mapper: first implementations
- Writing object to object mapper: moving to generics
- Writing object to object mapper: my mapper vs AutoMapper
- My object to object mapper source released
- Using Roslyn to build object to object mapper
NB! If you are building applications that will run on public servers then use AutoMapper as it is widely used and tested. AutoMapper has tons of features that my little mapper doesn’t have. Also it is easier to get support for AutoMapper if you face the troubles.
Okay, but let’s compare results. Because my mapper has no powerful features and is therefore very light it performs a little bit faster. Take look at the following report.
~6 times faster – not bad at all for my little feature-free mapper or what do you think?
There are some improvements I plan to add to my mapper but as these improvements doesn’t affect copying operation. I will write my final version of mapper in near future and provide it in this blog as binary and Visual Studio 2008 project.