LINQ to SQL Beta2 Performance Numbers and the Dynamic Compilation Pattern

Jomo Fisher–Rico Mariani has been posting about LINQ to SQL perfomance and has finally posted the performance numbers for Beta2:

One of the tricks Rico and Matt Warren used to get this stellar performance was to generate IL at run time. I learned this design pattern from Matt and used it on a completely different problem (see to get a 900% performance improvement. I don’t know whether this pattern already has a name (Dynamic Compilation seems to fit) but it’s hard to ignore its potential for significant performance improvement in a particular class of problem. A further benefit is that you can hide a lot of complex, deep thinking code behind a simple interface that you present to your user.

Correction: Now that I think about it, I may have originally learned this pattern from my high school friend Brandon D’Souza who used it to compile equations into Apple II machine language. This was for a spread sheet application our teacher wanted to call ‘Rickards High Scool 1-2-3-4.’

This posting is provided “AS IS” with no warranties, and confers no rights.

Skip to main content