Skip to content

Instantly share code, notes, and snippets.

@lhecker
lhecker / bytesum_intrinsics.c
Created May 13, 2014 15:14
Optimized version of bytesum_intrinsics.c from http://jvns.ca/blog/2014/05/12/computers-are-fast/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <emmintrin.h>
/*
* Round up n to the next multiple of m.
* m needs to be a power of 2.
*/