How to make `String.Index` with `Int` offset (distance) in O(1) time?

Speaking of fast UTF8, there's this [Accepted with modification] SE-0247: Contiguous Strings.

So you can drop-down to array of UInt8 if you need to. Though contiguous string already have fast index manipulation, even for existing APIs.