Improve performance of did_you_mean.