cstrftime
cstrftime copied to clipboard
Trying to add benchmarks but something is broken
Time doesn't get formatted correctly, decimal seconds disappear, and something about the benchmarks results in null characters for the day of the month in the benchmarks.
The one benchmark that does work so far shows a pretty hefty performance hit:
go test -bench . -benchmem -run XXX
goos: darwin
goarch: amd64
pkg: github.com/apiarian/cstrftime
BenchmarkFormat/year_-_native(true)-4 20000000 95.5 ns/op 4 B/op 1 allocs/op
BenchmarkFormat/year_-_native(false)-4 500000 2486 ns/op 16 B/op 3 allocs/op
Also tests will fail in locales that are not UTC (Travis seems to be, but my Mac isn't). Something about the time being reported incorrectly.