FWIW I believe the second optimization is at odds with the first. It’s really hard to do this kind of conditional historical check in SIMD.