Board Thread:Wiki Discussion/@comment-43517768-20190830120727/@comment-43517768-20190830125912

I also don't get why the string functions are so expensive as to need global limits. Take #pos, search for substring in a string. Looking at the PHP code for #pos in https://www.mediawiki.org/wiki/Extension:StringFunctions, it's doing a crazy double look through the array of characters rather than using PHP's built in strpos that does the same thing, and which is basically the C strstr function taking an initial offset parameter. At the CPU level we're talking about a handful of opcodes that on the size of strings we're dealing with would execute faster than it takes the parser to interpret the command anyway.