Although ArrayList generally suffices as a replacement for std::vector, if
the elements are small value types there will be a loss of time and space
efficiency due to boxing and unboxing (not just the time needed for the
boxing operations, but also the impact on cache). If you're stuck with CLR
1.0, for these cases it may be more appropriate in performance-critical
sections to create your own list class based on arrays of a fixed type (or,
when dealing with single bits, to use BitArray). The generic List<> of C#
2.0 avoids this overhead. You can read more about the specific
implementation of generics in CLR 2.0 here:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.