let target_chars: Vec<char> = target.chars().collect();
for (i, source_char) in source.chars().enumerate() {
let mut next_dist = i + 1;
for (j, target_char) in target_chars.iter().enumerate() {
> written mindlessly
> incompetence of the person cache := make([]int, len(targetChars)+1)
for i := 0; i < len(targetChars)+1; i++ {
cache[i] = i
}
AFAIK this makes them equivalent (fingers crossed). It seems to not have made much of a difference (-0.03s)