Skip to content

Instantly share code, notes, and snippets.

View trygenericdev's full-sized avatar

trygenericdev

View GitHub Profile
@trygenericdev
trygenericdev / rollsum_file.go
Created February 24, 2015 03:51
Rollsum on testfile
package main
import (
"bufio"
"io"
"fmt"
"os"
"rollsum"
)
@trygenericdev
trygenericdev / rollsum_bench.go
Last active August 29, 2015 14:16
BenchmarkRollsum
func BenchmarkRollsum(b *testing.B) {
const bufSize = 5 << 20
buf := make([]byte, bufSize)
for i := range buf {
buf[i] = byte(rand.Int63())
}
b.ResetTimer()
rs := New()
splits := 0