I noticed the optimizations for the single-element array and has_value() en search() in the list of optimizations (Nice!). I noticed has_suffix() and has_prefix() were not mentioned. I guess those could have a similar optimization, but it'd be less worthwhile, because those doesn't have to cycle through many characters (and likely therefor have a negative effect in performance even?)
One other candidate that I was wondering about, is String.count(). (In pike 7.4) it doesn't seem to accept a character for the second parameter, but I wonder if it might be possible, and worthwhile optimizing there as well?
Regards,
Arjan