Go package to compare the performance of different solutions for the same problem.
Problem: Given a non-empty string, return true if the string is a palindrome. Punctuation and spaces should be ignored.
go get github.com/hgfischer/go-palindrome/gopalindrome
cd $GOPATH/src/github.com/hgfischer/go-palindrome/gopalindrome
go test -test.bench="."
Results in a Intel Core-i7 laptop:
PASS
BenchmarkPalindromeA 20000 79121 ns/op
BenchmarkPalindromeB 1000000 1700 ns/op
ok github.com/hgfischer/go-palindrome/gopalindrome 4.118s