Drew's Blog

The Joys of Technology Explored

Strongly Typed IEnumerable/IEnuerator: Perf. Boost

Trevor Misfeldt has an interesting article on iteration performance in .NET .

Here are some additional things to consider:

... snipped for brevity ...

It would be cool if someone (Trevor?) would perform these simple steps and rerun the tests. The results should be much closer to the indexer.

[Don Box's Spoutlet]

Don's spot on here. All too often people overlook the performance boost of strongly typed IEnumerable/IEnumerator implementations. I think this is mainly because you have to write a lot of redundant code each time you write a custom collection. Of course, you could just have a code-generator to do the work for you. ;)

Fortunately, I think this issue will go away for C# people with the advent of iterators which will be a welcome addition to the language's features in the Whidbey release of .NET.

Posted: Apr 25 2003, 09:58 AM by drub0y | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)