Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add benchmarks but something is broken #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apiarian
Copy link

@apiarian apiarian commented May 6, 2018

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

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.
@apiarian
Copy link
Author

apiarian commented May 6, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant