Performance benefits of sealed class in .NET
The Insider News
2
Posts
2
Posters
0
Views
1
Watching
-
-
Either some of those benchmarks aren't being reported correctly, or the compiler has optimized the inner loop into a no-op.
Quote:
Method Mean Error StdDev Ratio Code Size
NonSealed 0.0668 ns 0.0156 ns 0.0138 ns 1.00 64 B
Sealed 0.0307 ns 0.0209 ns 0.0185 ns 0.50 35 BA duration of 0.0307ns corresponds to 1 clock cycle on a 32.5ghz chip. :doh: Even competitive overclockers using liquid nitrogen cooling can't get that fast.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius