This is a fix for slowness accessing random lines in the source file for diagnostics.
This version I added a unit test as requested by David, and also added a x86 vectorization hint for the hot line search function (with the early break work the vectorizer is powerful enough to handle it now) If the patch kit is too big I would recommend 1, 2, 7 for gcc 15 and the rest in the next phase 1. The subset doesn't completely fix the problem, but makes it much better and it an be fixed with tunables. -Andi