lestrrat-go / strftime

Fast strftime for Go
MIT License
110 stars 21 forks source link

Benchmark. #34

Closed ncruces closed 1 year ago

ncruces commented 1 year ago

This adds my alternative strftime implementation to your benchmark. Feel free to ignore, just thought you might find it interesting.

Thanks for your tests and benchmark that I used as guidance!

Results:

$ go test -bench . -benchmem
goos: darwin
goarch: amd64
pkg: github.com/lestrrat-go/strftime/bench
cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
BenchmarkTebeka-12                                420945              2858 ns/op             257 B/op         20 allocs/op
BenchmarkJehiah-12                                923040              1122 ns/op             256 B/op         17 allocs/op
BenchmarkFastly-12                               2920372               417.9 ns/op            80 B/op          5 allocs/op
BenchmarkNcruces-12                              2720719               425.7 ns/op            64 B/op          1 allocs/op
BenchmarkNcrucesAppend-12                        3047410               385.3 ns/op             0 B/op          0 allocs/op
BenchmarkLestrrat-12                              805414              1497 ns/op             288 B/op         15 allocs/op
BenchmarkLestrratCachedString-12                 3325786               350.9 ns/op           128 B/op          2 allocs/op
BenchmarkLestrratCachedWriter-12                 3544892               329.8 ns/op            64 B/op          1 allocs/op
BenchmarkLestrratCachedFormatBuffer-12           4147578               286.6 ns/op             0 B/op          0 allocs/op
PASS
ok      github.com/lestrrat-go/strftime/bench   15.200s
codecov-commenter commented 1 year ago

Codecov Report

Merging #34 (d19abdc) into master (547681d) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   79.92%   79.92%           
=======================================
  Files           7        7           
  Lines         274      274           
=======================================
  Hits          219      219           
  Misses         38       38           
  Partials       17       17           
lestrrat commented 1 year ago

Thanks!