However I would still expect considerably worse performance from the CLR
solution because it will be boxing everything that goes in there.

So for this benchmark, what are you trying to measure?  Do you only care
about the performance of a container of ints, or are you trying to infer
something more general about the performance of the collection classes?  If
the former, this is clearly a reasonable test.  If the latter, you will need
to be very careful about the conclusions that you draw.


--
Ian Griffiths
DevelopMentor

----- Original Message -----
From: "Thomas Tomiczek" <[EMAIL PROTECTED]>


PLEASE - you benchmark two different things :-)

C#:
   ArrayList ElementObject=  new ArrayList();

C++:
        VECTORINT intList;
        intList.reserve(5000000L);

I strongly suggest you do reserve the space in the ArrayList, too.
Currently ArrayList (in the C# code) gets expanded multiple times, while
your C+ code has the advantage of being able to allocate the correct
size beforehand :-)

That's NOT a comparable benchmark :-)

-----Original Message-----
From: Yogesh Shetty [mailto:[EMAIL PROTECTED]]

We have performed a benchmark for the following collection

1.    VC++ List collection
2.    Silicon Graphic List collection ( VC++ )
3.    .NET ArrayList collection

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to