From efee641f0d2f36c18222ce7c33b5442b2906dac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Mon, 8 Nov 2021 18:38:44 +0100 Subject: [PATCH] Add more info about bench and adding new chars to README (#7) --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2849742..3f95400 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,20 @@ go get -u github.com/gosimple/unidecode ## Benchmark ```shell -go get golang.org/x/perf/cmd/... - -go test -run=NONE -bench=. ./... > old.txt +go test -run=NONE -bench=. -benchmem -count=6 ./... > old.txt # make changes -go test -run=NONE -bench=. ./... > new.txt +go test -run=NONE -bench=. -benchmem -count=6 ./... > new.txt + +go install golang.org/x/perf/cmd/benchstat@latest benchstat old.txt new.txt ``` + +## Add new characters + +1. Edit `table.txt` file. +2. Rebuild `table.go` file: + + ```go + go run ./make_table.go + ```