Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use min() builtin function, update Go minimum version to 1.21
benchstat does not indicate any performance regression. goos: linux goarch: amd64 pkg: github.com/agnivade/levenshtein cpu: AMD Ryzen 7 7840U w/ Radeon 780M Graphics │ before.txt │ after.txt │ │ sec/op │ sec/op vs base │ Simple/ASCII-16 134.3n ± 0% 134.5n ± 0% ~ (p=0.135 n=20) Simple/French-16 253.8n ± 0% 253.5n ± 0% ~ (p=0.155 n=20) Simple/Nordic-16 499.4n ± 0% 498.1n ± 0% -0.26% (p=0.005 n=20) Simple/long_string-16 1.853µ ± 0% 1.852µ ± 0% ~ (p=0.878 n=20) Simple/Tibetan-16 414.3n ± 0% 414.4n ± 0% ~ (p=0.952 n=20) All/ASCII/agniva-16 136.4n ± 0% 136.4n ± 0% ~ (p=0.941 n=20) All/ASCII/arbovm-16 193.0n ± 0% 192.6n ± 0% ~ (p=0.151 n=20) All/ASCII/dgryski-16 198.6n ± 0% 198.8n ± 1% ~ (p=0.292 n=20) All/French/agniva-16 255.9n ± 0% 255.9n ± 0% ~ (p=0.899 n=20) All/French/arbovm-16 332.1n ± 0% 331.6n ± 0% ~ (p=0.857 n=20) All/French/dgryski-16 333.2n ± 0% 333.1n ± 0% ~ (p=0.732 n=20) All/Nordic/agniva-16 500.1n ± 0% 499.9n ± 0% ~ (p=0.673 n=20) All/Nordic/arbovm-16 604.1n ± 0% 606.6n ± 0% +0.41% (p=0.041 n=20) All/Nordic/dgryski-16 612.4n ± 0% 612.4n ± 0% ~ (p=0.984 n=20) All/Tibetan/agniva-16 414.4n ± 0% 414.5n ± 0% ~ (p=0.753 n=20) All/Tibetan/arbovm-16 501.4n ± 1% 499.1n ± 1% ~ (p=0.262 n=20) All/Tibetan/dgryski-16 504.9n ± 0% 504.8n ± 0% ~ (p=0.888 n=20) geomean 365.7n 365.6n -0.03%
- Loading branch information