mattn / go-runewidth

wcwidth for golang
MIT License
609 stars 94 forks source link

Broken benchmark tests #50

Closed johejo closed 3 years ago

johejo commented 3 years ago

c9bd7d1b27861f3068ba9182eb78d14a3282bdd8 and 43a826dcfbd153f169a11fce22952a327a265edc broke benchmark tests

$ go test -bench . -benchmem
--- FAIL: BenchmarkRuneWidthAll
    benchmark_test.go:27: got 1293942, want 1293932
goos: linux
goarch: amd64
pkg: github.com/mattn/go-runewidth
cpu: 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz
BenchmarkRuneWidth768-4                   650364              1877 ns/op               0 B/op          0 allocs/op
--- FAIL: BenchmarkRuneWidthAllEastAsian
    benchmark_test.go:27: got 1432568, want 1432558
BenchmarkRuneWidth768EastAsian-4           85194             14217 ns/op               0 B/op          0 allocs/op
--- FAIL: BenchmarkString1WidthAll
    benchmark_test.go:62: got 1295990, want 1295980
BenchmarkString1Width768-4                  9513            125876 ns/op           86016 B/op       3072 allocs/op
--- FAIL: BenchmarkString1WidthAllEastAsian
    benchmark_test.go:62: got 1436664, want 1436654
BenchmarkString1Width768EastAsian-4         8168            142574 ns/op           86016 B/op       3072 allocs/op
BenchmarkTablePrivate-4                      656           1798150 ns/op               0 B/op          0 allocs/op
BenchmarkTableNonprint-4                     402           2982255 ns/op               0 B/op          0 allocs/op
BenchmarkTableCombining-4                    264           4511447 ns/op               0 B/op          0 allocs/op
BenchmarkTableDoublewidth-4                  222           5379437 ns/op               0 B/op          0 allocs/op
BenchmarkTableAmbiguous-4                    183           6475643 ns/op               0 B/op          0 allocs/op
BenchmarkTableEmoji-4                        222           5272836 ns/op               0 B/op          0 allocs/op
BenchmarkTableNarrow-4                       522           2255628 ns/op               0 B/op          0 allocs/op
BenchmarkTableNeutral-4                      144           8281886 ns/op               0 B/op          0 allocs/op
FAIL
exit status 1
FAIL    github.com/mattn/go-runewidth   19.880s