Changeable words: Difference between revisions
Content deleted Content added
Added Wren |
→{{header|Wren}}: Modified the Hamming function to break when count reaches 2 - about 8% faster. |
||
Line 390:
var i = 0
while (i < s1.count) {
if (s1[i] != s2[i])
count = count + 1
if (count == 2) break // don't care about counts > 2
}
i = i + 1
}
|