From f3ba79298a26169d6563c42bbd437b903623c599 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Thu, 2 Nov 2023 01:14:25 +0100 Subject: init --- readme.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 readme.txt (limited to 'readme.txt') diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..d9646d9 --- /dev/null +++ b/readme.txt @@ -0,0 +1,19 @@ +This is a toy program to play with cache line alignment. + +The program iterates over a 2D array and modify the elements, and record +the time it takes for the traversal. +Each array row has a tailing padding of OFF*4 bytes (i.e. OFF x sizeof(int)). +The padding elements are NOT traversed, they are only there to make the array +misaligned. + +The makefile builds 17x binaries with OFF = 0...16. The testall.sh script +runs each of them 100 times and print the averaged output. + +Build: +$make + +run: +$sh testall.sh + + +Play around: change the demensions of the array and the loop operations. -- cgit v1.2.3-70-g09d2