タグ付けされた質問 「benchmarkdotnet」

1
この場合にconstを使用するオーバーヘッドを説明できるものは何ですか?
私はここの壁に頭をぶつけているので、あなたの何人かが私を教育することができるかもしれないことを願っています。私はBenchmarkDotNetを使用していくつかのパフォーマンスベンチマークを行っていましたが、メンバーを宣言するとconstパフォーマンスが大幅に低下すると思われるこの奇妙なケースに遭遇しました。 using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; using System; namespace PerfTest { [DisassemblyDiagnoser(printAsm: true, printSource: true)] public class Test { private int[] data; private int Threshold = 90; private const int ConstThreshold = 90; [GlobalSetup] public void GlobalSetup() { data = new int[1000]; var random = new Random(42); for (var i = …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.