Skip to content

Instantly share code, notes, and snippets.

@billywhizz
billywhizz / testloop.c
Created July 16, 2011 17:39
testing cpu write combining performance characteristics with loops
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
/*
This program tests the performance characteristics of write combining
On an intel CPU only 4 writes at a time will be combined so we should see
a big performance improvement if we only write to distinct memory locations
<=4 times per iteration of a loop