How to produce the cpu cache effect in C and java?

后端 未结 5 1143
情话喂你
情话喂你 2021-02-09 02:15

In Ulrich Drepper\'s paper What every programmer should know about memory, the 3rd part: CPU Caches, he shows a graph that shows the relationship between \"working set\" size an

5条回答
  •  天命终不由人
    2021-02-09 03:17

    I can't say for certain about 1 and 2, but it would be more challenging to successfully run such a test in Java. In particular, I might be concerned that managed language features like automatic garbage collection might happen during the middle of your testing and throw off your results.

提交回复
热议问题