This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conjugate split-radix FFT inner loop | |
// Both of these compiled with VC++ 2012, 32-bit, "/O2 /fp:fast". | |
// NOTE: I also tried clang-cl and it seems to be primarily a VC++ | |
// problem. (Which doesn't help me much.) | |
// | |
// NOTE 2: argh, did the Clang test wrong. It's still primarily a | |
// VC++ problem, but Clang has a notable slowdown too. Anyway, new | |
// results generated automatically from a simpler standalone test | |
// where I can toggle between versions using a single commandline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A small, and relatively primitive, C-style Brainfuck compiler/interpreter. | |
// Written by Joe Savage, 2014 | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#define STACK_SIZE 512 | |
#define DATA_SIZE 65535 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script type="application/javascript;version=1.7"> | |
var worker = new Worker('worker.js'); | |
var g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// float->sRGB8 conversions - two variants. | |
// by Fabian "ryg" Giesen | |
// | |
// I hereby place this code in the public domain. | |
// | |
// Both variants come with absolute error bounds and a reversibility and monotonicity | |
// guarantee (see test driver code below). They should pass D3D10 conformance testing | |
// (not that you can verify this, but still). They are verified against a clean reference | |
// implementation provided below, and the test driver checks all floats exhaustively. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; A minimal Mach-o x64 executable for OS X (also see below Mountain Lion version) | |
; | |
; $ nasm -f bin -o tiny_hello tiny_hello.s | |
; $ chmod +x tiny_hello | |
; $ ./tiny_hello | |
; Hello World! | |
; $ | |
; c.f. | |
; http://osxbook.com/blog/2009/03/15/crafting-a-tiny-mach-o-executable/ ( the original tiny mach-o executable ) |
NewerOlder