News for hackers. Stuff that matters.
Re:Why Java Will Always Be Slower than C++ by sratner on Sunday July 20, 2008 @08:32PM (#251806)
Exactly. In .NET heap allocations are practically as fast as stack allocations, although of course there are other things you need to be aware of when using a compacting generational GC, such as avoiding medium-lived objects at all costs. .NET does also provide value-types that can be allocated on the stack, and you use them for reasons that are better than "heap allocations are slow".

I think the moral of the story is: to get the maximum performance out of your memory management system, you need to know how it works. This applies equally well to C++.

There are no comments on this comment yet.