5% 的执行时间花在了 GC 上? 10%? 25%?
谢谢。
最佳答案
This blog post对该领域进行了有趣的调查。
海报的结论?对于他的示例,开销可以忽略不计。
So the GC heap is so fast that in a real program, even in tight loops, you can use closures and delegates without even giving it a second’s thought (or even a few nanosecond’s thought). As always, work on a clean, safe design, then profile to find out where the overhead is.
关于c# - .NET:典型的垃圾收集器开销是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2267394/