I’ve been meaning to write some benchmark code to compare the performance of .NET 2.0’s new XslCompiledTransform class and 1.1’s deprecated XslTransform. I finally got around to it this morning, and the results were a little disappointing.

In my tests, which used a fairly simple style sheet, XslCompiledTransform ran about 3 times faster than XslTransform. While that’s consistent with the expectations set by Microsoft’s XML team, I had hoped for more given that MSXML 4.0 can sometimes outperform XslTransform by orders of magnitude. Time permitting, I’d like to run the same tests again with larger, more complex style sheets and XML documents. I don’t expect to see a huge difference, though.

At least XSL transformations didn’t get get slower in version 2.0…