[Mono-list] System.Collections.ArrayList Patch

Ben Maurer bmaurer@users.sourceforge.net
03 May 2003 10:01:11 -0400


On Sat, 2003-05-03 at 01:00, Thong (Tum) Nguyen wrote:
> That won't work because the wrapper doesn't use dataArray.  The wrapped
> list might not even be a wrapper.
That's why I have to copy it to a new array.
> My implementation supported almost all the missing functions and had a
> few bug fixes as well.  It also implemented sort *directly* on the inner
> list rather than making a temporary copy of an array (so it would be
> much faster).
I profiled an application running on the Microsoft bcl. It turns out
that when you call Sort () on a wrapper, it does the exact same behavior
I do. So it looks like Microsoft is fine with the speed of copying the
array.

I talked to Nick however and he agreed that it would be better to do the
sort directly on the wrapper. Feel free to submit a patch that does
that. I will check it in if it passes NUnit tests.

--Ben Maurer