The min function used in the Levenshtein distance algorithm can be improved by using the CMOV instruction instead of conditional jumps. The updated function produces better performance than the original min function.
link: https://gcc.godbolt.org/z/EazrW9zKb
func min2(a, b int) int {
if a < b {
return a
}
return b
}
func min3(a, b, c int) int {
return min2(min2(a, b), c)
}
link: https://gcc.godbolt.org/z/EazrW9zKb