This probably just an example, but why are they using a signed int for indexing???
This lets you use UBSan most effectively and it's what the Google style guide says to do.
(Exception if you care about micro-performance: * / >> operations can be a little faster on unsigned types IIRC)
It always feels dirty deliberately using a signed type for something you know can never be neagtive just because that signed type has other properties you want.