What is the Cost of an L1 Cache Miss?

后端 未结 8 1874
耶瑟儿~
耶瑟儿~ 2020-12-22 17:12

Edit: For reference purposes (if anyone stumbles across this question), Igor Ostrovsky wrote a great post about cache misses. It discusses several differen

8条回答
  •  借酒劲吻你
    2020-12-22 17:27

    While I can't offer an answer to whether or not the numbers make sense (I'm not well versed in the cache latencies, but for the record ~10 cycle L1 cache misses sounds about right), I can offer you Cachegrind as a tool to help you actually see the differences in cache performance between your 2 tests.

    Cachegrind is a Valgrind tool (the framework that powers the always-lovely memcheck) which profiles cache and branch hits/misses. It will give you an idea of how many cache hits/misses you are actually getting in your program.

提交回复
热议问题