Note: These tutorials are incomplete. More complete versions are being made available for our members. Sign up for free.

Processor with Large Cache memory

a) Processor speed is only one metric. Celeron vs Pentium - cache memory.

Cache is symmetric to memory, but the speed difference between hard-drive and memory and memory and cache is different. That is why not too many people think about cache. Secondly compiler takes care of cache, whereas disk access is done by programmer.

b) Instruction cache vs data cache

c) How to make code cache memory efficient?

Temporal locality - if you use data now, you will use it soon.

Spatial locality - if you data now, you will possibly do something with data around it.

a) multidimensional arrays - large block of data versus data with hole

http://stackoverflow.com/questions/763262/how-does-one-write-code-that-best-utilizes-the-cpu-cache-to-improve-performance

b) optimization turn on - rely on compiler

c)

http://lwn.net/Articles/250967/

http://arstechnica.com/gadgets/2002/07/caching/

d) write through and write back

e) linked lists are far less efficient from blocks of array data

e) programmers should send unused data directly to RAM.

http://lwn.net/Articles/255364/

#include void _mm_stream_si32(int *p, int a); void _mm_stream_si128(int *p, __m128i a); void _mm_stream_pd(double *p, __m128d a);

#include void _mm_stream_pi(__m64 *p, __m64 a); void _mm_stream_ps(float *p, __m128 a);

#include void _mm_stream_sd(double *p, __m128d a); void _mm_stream_ss(float *p, __m128 a);


Web Statistics