Thanks for your responses. And, apologies for the glacial pace of my reply
back!
Your feedback was great. I've tried a bunch of things and here are the
three implementations that are either readable, performant or both:
http://play.golang.org/p/xVrG22kAdO
Paul, thanks for identifying the flat out errors in my code. Including
duplicate bigrams is quite practical for string comparisons for general
use-cases but it is definitely not a correct implementation for finding the dice
coefficient :)
func KylesTweaked: Kyle, as your implementation was an improvement on my
original code it had the same issues. I've addressed those, and of the
three versions it is the fastest by a substantial margin.
func PaulHankin: Paul, your implementation is extremely readable, handles
unicode and is very performant. Thank you. It's awesome.
func TheLongWay: For some reason I became obsessed with finding the fastest
implementation I could come up with that handled unicode. Paul, you're a
tough act to follow :) I tried everything I could think of, aside from
copying the utf8 parsing code from the standard library (I wasn't that
obsessed) and eventually did find something that tends to be faster.
However, it is possibly the most cryptic code I've written.
I will post and attribute the first two implementations to wikibooks this
weekend.
Thanks again.
--