How to find the size of the L1 cache line size with IO timing measurements?

后端 未结 8 763
深忆病人
深忆病人 2021-01-30 09:10

As a school assignment, I need to find a way to get the L1 data cache line size, without reading config files or using api calls. Supposed to use memory accesses read/write timi

8条回答
  •  死守一世寂寞
    2021-01-30 09:32

    I think you should write program, that will walk throught array in random order instead straight, because modern process do hardware prefetch. For example, make array of int, which values will number of next cell. I did similar program 1 year ago http://pastebin.com/9mFScs9Z Sorry for my engish, I am not native speaker.

提交回复
热议问题