[Mono-dev] Trivial Enumerable Optimizations

Jb Evain jb at nurv.fr
Sat May 10 03:30:20 EDT 2008


Hey,

Sorry, I reviewed this patch on IRC, and should have done it here.

On 5/9/08, Jonathan Pryor <jonpryor at vt.edu> wrote:
>  Thoughts?

My point was that basically, there's no any way to make sure that
Count will throw if the collection has more than int.MaxValue items.
So the only optimizable code path is if the source is an array, which
is already done.

To me the only way is to enumerate over the elements to get the
LongLength, and Robert's test case shows that .net does the same.

So this patch is not making it in.

-- 
Jb Evain  <jb at nurv.fr>


More information about the Mono-devel-list mailing list