阅读背景:

为什么本地数组的读/写速度比静态数组快?

来源:互联网 

I was writing a few benchmarking tests to figure out why a similar pure algorithm (no C++ lib / .net built in classes) ran much faster in C++ than in C#, even when accounting for the expected feature différences. And while doing so i stumbled on these 2 tests that baffled me, does anyone have an idea about why one is substantially slower thant he other? The only difference in the 2nd one (that takes 51ms vs 88 on my machine) is that the 2 arrays are declared locally in the method instead of outside. In both cases the arrays are created before we start timing.I was writing a few benchmarking tests to figur




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: