Skip to content

Instantly share code, notes, and snippets.

View DeedleFake's full-sized avatar

DeedleFake

View GitHub Profile
@DeedleFake
DeedleFake / delta
Created March 28, 2016 19:53
go1 benchmarks devel +cabf73f
BenchmarkBinaryTree17-4 5022008650 -6.02%
BenchmarkFannkuch11-4 4645926951 -23.40%
BenchmarkFmtFprintfEmpty-4 84.9 -7.30%
BenchmarkFmtFprintfString-4 266 -20.30%
BenchmarkFmtFprintfInt-4 264 -20.08%
BenchmarkFmtFprintfIntInt-4 420 -24.05%
BenchmarkFmtFprintfPrefixedInt-4 391 -17.65%
BenchmarkFmtFprintfFloat-4 549 -16.58%
BenchmarkFmtManyArgs-4 1711 -20.86%
BenchmarkGobDecode-4 12907474 -9.27%
@DeedleFake
DeedleFake / fib.rs
Last active August 29, 2015 14:25
A (mostly) straight port of the Go examples at https://golang.org/doc/play to Rust.
fn fib() -> Box<FnMut() -> i32> {
let (mut a, mut b) = (0, 1);
Box::new(move || {
let c = a + b;
a = b;
b = c;
a
})
@DeedleFake
DeedleFake / count.go
Last active August 29, 2015 14:19
Counts how many times an outfit tag appears.
package main
import (
"bufio"
"bytes"
"container/heap"
"fmt"
"io"
"os"
"regexp"
@DeedleFake
DeedleFake / test.cpp
Last active December 18, 2015 17:10
A little test to try to figure out a way to deal with C++ classes using the new C++ support in CGo.
#include <iostream>
#include "test.h"
class Test
{
protected:
const char *str;
public: