Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3337264
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:13:58+00:00 2026-05-18T00:13:58+00:00

I’m working with a framework that uses collections derived from System.Collections.CollectionBase . Users have

  • 0

I’m working with a framework that uses collections derived from System.Collections.CollectionBase. Users have been complaining about performance, and I feel that these collections, which are very heavily used, might be a big part of the problem. Is there a way with a tool or profiler or in the IL that I can get some metrics on boxing/unboxing penalties? I need evidence to back-up a push for System.Collections.Generic instead. I’ve tried CLRProfiler, but tend to get lost and am not sure what I should be looking for.

UPDATE
Thanks all for your input so far. I am aware that this is probably not the main bottleneck, but am looking for metrics on as many possible performance killers as I can. This is just one of them, not sure how big it is, hence looking for a way to measure it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:13:58+00:00Added an answer on May 18, 2026 at 12:13 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.