How many bytes does a Xeon bring into the cache per memory access?

后端 未结 5 969
时光说笑
时光说笑 2020-12-28 10:17

I am working on a system, written in C++, running on a Xeon on Linux, that needs to run as fast as possible. There is a large data structure (basically an array of structs)

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 10:51

    Today’s CPUs fetch memory in chunks of (typically) 64 bytes, called cache lines. When you read a particular memory location, the entire cache line is fetched from the main memory into the cache.

    More here : http://igoro.com/archive/gallery-of-processor-cache-effects/

提交回复
热议问题