While I certainly encourage you to move from non-generic to generic collections for plenty of good reasons, I honestly doubt that these collections could be the cause of your performance problems. Boxing is generally only an issue when you get to the microscopic level, needing to squeeze out tiny gains in high-performance situations. It's also good to avoid in general for GC reasons, but it's typically minor in that arena as well.
To put it another way: it's highly doubtful that boxing would cause a performance issue that your users would notice.
Obviously, I'm speaking in generalizations. Without knowing your specific scenario, I can't really say that much with any certainty.
Edit: Note that while I am skeptical your problem could be your use of non-generic collections per se, I will point out that it is very important what type of collection you use to tackle a given problem, particularly when the amount of data in the collection is large. Here are just a few examples:
- If you are performing lookups based on a key, a hash table such as
Dictionary<TKey, TValue>
will significantly outperform a List<T>
, for example.
- If you are checking for duplicates, a
HashSet<T>
will have superior performance.
- If you are looking for FIFO (queue-like) behavior, a
Queue<T>
will have superior performance.
- If you are performing insertions/removals at random positions within the collection, a
LinkedList<T>
will have superior performance.
These collections should be part of any .NET developer's (really, any developer's) set of tools. If you find yourself using a List<T>
(or ArrayList
) or similar data structure everywhere you utilize collections of items, that very well may cause a performance issue down the road--again, particularly when your collections are large. These are not trivial performance gains I'm talking about. So do take care to make sensible choices for your collection types.
But I'd recommend a performance profiler in general, such as ANTS (good, but not free) or EQATEC (also good and free). Just run your application under a program such as one of these and see where your bottlenecks are. My guess is that you'll find it isn't with your non-generic collections; but naturally, I could be wrong.