strings: more efficient first non-repeating for long strings