Sample code: https://pastebin.com/duYF2QfE
This was on a "Early 2015" rMBP with a 3.1 GHz i7.
if (data[i] == strArr[found]) {
if (data[i] == stringToFind.codePointAt(found)) {
That way both golang and Java will be performing proper unicode code point indexing.
Of course the optimization you made makes sense, but I think it'd be fair for the golang version to do same.
That way both golang and Java will be performing proper unicode code point indexing.
Of course the optimization you made makes sense, but I think it'd be fair for the golang version to do same.