Optimization in KDE Base
Abbreviation matching: performance optimizations to prevent the worst case
This puts two checks in place; one which avoids the worst case from
occuring in certain situations, and one which limits the time the function
may run in the worst case to something small (<1ms), after that it will
just claim there's a mismatch and abort.