Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
cellularmitosis / Makefile
Last active June 27, 2020 10:37
A trivial sudoku solver, in C
a.out: sudoku.c
gcc -std=c89 -Wall -Werror -O3 sudoku.c
clean:
rm -f a.out
.PHONY: clean
@Lovesan
Lovesan / simd-pack-single.lisp
Last active March 15, 2022 05:05
SBCL SSE operations on single-float vectors
(in-package #:sb-vm)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defknown %m128+ ((simd-pack single-float) (simd-pack single-float))
(simd-pack single-float)
(movable foldable flushable always-translatable)
:overwrite-fndb-silently t)
(define-vop (%m128+)
@rygorous
rygorous / gist:4172889
Created November 30, 2012 00:28
SSE/AVX matrix multiply
#include <immintrin.h>
#include <intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
union Mat44 {
float m[4][4];
__m128 row[4];
};
@bsstokes
bsstokes / build-ruby-1.9.2-p180-gcdata.sh
Created November 27, 2012 19:47
Build ruby-1.9.2-p180 patched with gcdata for rbenv
# Build ruby-1.9.2-p180 patched with gcdata for rbenv
# ===================================================
#
# This script will install a version of ruby-1.9.2-p180 for [rbenv][] that's
# patched with RVM's [gcdata][] patch.
#
# CAVEAT
# ------
#
# Keep in mind that this is for **ruby-1.9.2-p180**. Update the version numbers