[Mono-list] List.FindAll method implementation

Miguel de Icaza miguel at novell.com
Sun Mar 18 17:54:06 EDT 2007


Hello,

    I feel a bit strange that the bools are allocated using
numbers.Count but the loop uses this._items.   I rather keep them in
parallel.

    Also, another idea might be to use three code paths depending on the
number of items:

	* [0,N] use bools.
	* [N,M] use bitbools.
	* [M,infinity] use the old method.

    Thread stacks could not be very large, and you would like to avoid a
crash in that condition.   Actually, I wonder if stackalloc returns a
null if the requested size is larger than the available stack. 

Miguel.

> Attached.
> 
> Juan C. Olivares
> www.juancri.com
> 
> On 3/18/07, Miguel de Icaza <miguel at novell.com> wrote:
>         Hello,
>         
>         >
>         > Do you have any comment?. I could send a patch... 
>         
>         These numbers look fantastic.   We would love to see a patch.
>         
>         > best regards
>         >
>         > Juan C. Olivares
>         > www.juancri.com
>         >
>         >
>         >
>         > _______________________________________________ 
>         > Mono-list maillist  -  Mono-list at lists.ximian.com
>         > http://lists.ximian.com/mailman/listinfo/mono-list
>         
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list