Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

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 to AutoMapper.

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.

 My mapper vs AutoMapper

~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.


kick it on DotNetKicks.com Shout it! 顶 Progg it Shout it

Comments

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# February 12, 2010 1:15 AM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# February 12, 2010 1:16 AM

progg.ru said:

Thank you for submitting this cool story - Trackback from progg.ru

# February 12, 2010 1:24 AM

9eFish said:

9efish.感谢你的文章 - Trackback from 9eFish

# February 12, 2010 1:26 AM

Servefault.com said:

Thank you for submitting this cool story - Trackback from Servefault.com

# February 12, 2010 1:27 AM

uberVU - social comments said:

This post was mentioned on Twitter by gpeipman: New blog post: http://tinyurl.com/ye23xbq - Writing object to object mapper: my mapper vs AutoMapper

# February 12, 2010 8:42 AM

Morten Mertner said:

You should check out fasterflect.codeplex.com

It is a full-featured library for reflection operations (both lookup and access). Internally it uses LCG and provides a cache of already generated delegates.

In addition it has a couple of nice extensions, like CopyProperties (inspired by your blog) and DeepClone.

Note that the library has changed substantially since last release so go for the source version if you take a look.

# February 13, 2010 6:45 PM

Writing object to object mapper: my mapper vs AutoMapper - Gunnar … said:

Pingback from  Writing object to object mapper: my mapper vs AutoMapper - Gunnar …

# February 14, 2010 1:25 AM

DigiMortal said:

Thanks for feedback, Morten! :)

I will check it out as soon as I have time enough. As topic is still actual and fresh I hope to get there soon.

# February 14, 2010 4:55 PM

Chavan Tatyabhau said:

अतिशय छान

# December 29, 2010 1:35 AM