#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.

Writing High-Performance .NET Code
Buying options
View on Amazon.com
or
    Features:
  • 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 floor keeps you clean from your truck and dry from the elements
  • Gear loft, gear pocket, and lantern holder to keep personal items organized
Specs:
Height9.25 Inches
Length7.5 Inches
Number of items1
Release dateMay 2018
Weight1.97 Pounds
Width1.19 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 1 comment on Writing High-Performance .NET Code:

u/The_Binding_Of_Data Β· 5 pointsr/csharp

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.