Skip to content

Instantly share code, notes, and snippets.

View mrsmith's full-sized avatar

Alexey mrsmith

  • Seattle, WA, USA
View GitHub Profile
@mrsmith
mrsmith / cache_torture.c
Created May 11, 2012 14:30
Simple cache-size detecting test
#include <stdio.h>
#include <malloc.h>
#include <sys/time.h>
#include <assert.h>
#define TIMER(t) double (t) = 0.0
#define START_TIMER(t) do { \
struct timeval start; \
gettimeofday(&start, 0); \