#14 in Microsoft NET books
Use arrows to jump to the previous/next product
Reddit mentions of Writing High-Performance .NET Code
Sentiment score: 1
Reddit mentions: 1
We found 1 Reddit mentions of Writing High-Performance .NET Code. Here are the top ones.
Buying options
View on Amazon.comor
- 2 large mesh windows offer optimal ventilation
- Large interior area with ample headroom
- Full rainfly provides ultimate weather protection, along with additional storm flaps covering the windows and doors
- Full tent ο¬oor keeps you clean from your truck and dry from the elements
- Gear loft, gear pocket, and lantern holder to keep personal items organized
Features:
Specs:
Height | 9.25 Inches |
Length | 7.5 Inches |
Number of items | 1 |
Release date | May 2018 |
Weight | 1.97 Pounds |
Width | 1.19 Inches |
It's going to depend on what you're putting in the list, but creating a new list each time is only going to create one additional object for the garbage collector to collect; the list object itself.
If the list is full of objects, each of those will need to be collected when they are no longer referenced by the list. This would happen in both the case where you clear the list (which will cause all the objects to be collected on the next run) or where you create a new new list (the objects will be collected when the list is collected).
The only way I see having the list be static making a big difference is if the list is hanging around long enough to be picked up in a gen 1 or gen 2 collection, but the records are only ever needed long enough to be picked up in a gen 0 collection.
In that case, reassigning the list would cause a gen 1 or 2 collection, which is more expensive than a gen 0 collection and could be avoided by clearing the list so the records are picked up in the gen 0.
If you're interested in optimizing .NET that much, I recommend Writing High-Performance .NET Code Second Ed.