You can. Here is my version: <https://godbolt.org/z/91KecEfbM>
Results:
N = 10000
range 1218.1
sentinel 937.258
mine 672.227
ratio 1.29964
(ratio is range/sentinel, not mine/whatever)You can get even more crazy with SIMD. But for all that you need to know the length beforehand.
Edit: The b4 variable should actually be called b8. That's a remnant of a previous version, where I used 32-bit chunks.