![]() |
|
|
|
#1
|
|||
|
|||
|
These points stand out.
"Now here's the rub. Marshalling is computationally expensive, and the more data you move back and forth, the more expensive it becomes. Marshalling data structures one way can add as much as 3,000 instructions to your processing time for complex data. " "By investing a little time early in the development phase, you can ensure that you made the right performance choice and not have to go back and make substantial changes after you have a working application. " Can we call CLoD a case study at this point? Jmho, the author comes across bias to managed mode programming. It's a good article though. Hopefully CLoD coders have access to the tool(s) the author speaks about to optimize the interop. |
|
#2
|
|||
|
|||
|
Memory leaks can occur in any language, no matter if a garbage collector is present or not. It's comes down to following good coding practices, it's especially important when making interop calls.
For me I have no doubt that CloD is written in C# due to early error messages people were posting after release. Also the only official Microsoft "Direct X" API that operates on .NET is XNA, however this is capped at DX9 so you can safely say that they CloD is making calls to the un-managed version of Direct X which is the current main stream API of choice. Maz is right, interop calls are taxing and I wouldn't be surprised it that has been the main cause of all the issues because I get the "feeling" that this style of programming for a game is still in it's pioneering days. |
|
#3
|
|||
|
|||
|
Quote:
__________________
Gigabyte Z68 Intel 2500K (@4.3 ghz)212 CM Cooler 8GB Ram EVGA 660SC (super clocked) 2GB Vram CORSAIR CMPSU-750TX 750W 64 GB SSD SATA II HD WIN7 UL 64BIT |
|
#4
|
|||
|
|||
|
Quote:
__________________
Gigabyte Z68 Intel 2500K (@4.3 ghz)212 CM Cooler 8GB Ram EVGA 660SC (super clocked) 2GB Vram CORSAIR CMPSU-750TX 750W 64 GB SSD SATA II HD WIN7 UL 64BIT |
|
#5
|
|||
|
|||
|
Another great article. Most of it I have to take in at a high level due my limited knowledge. I would guess the Suduko test involves heavy recursion/backtracing to compare memory allocation/de-allocation times of heap-dynamic arrays (C#) verses stack-dynamic arrays (C++)? Anyway, I'll bookmark this one for re-read in few months. In the meantime, I'll throw his gc quote on the pile as this guy seems an expert to me.
"Memory management concerns (not benchmarked here) are different in C# than C++. In particular, C# memory allocations are extremely fast, but the garbage collector is a wildcard: it may be fast or slow depending on your memory allocation patterns. And Microsoft has not provided any good way to measure GC performance. There are various guidelines to optimize GC: let objects die young where possible, avoid thick pointer trees (e.g. linked lists or SortedDictionary, a red-black tree), and so on; but it's really outside the scope of this article." |
|
#6
|
|||
|
|||
|
Quote:
|
![]() |
|
|