It is usually the algorithm that is fast. And for particular CPU's you can examine the assembler output.
That's fair and you're right, of course. Still,
You will be surprised when tinkering with all the possible compiler settings for a certain CPU.
I usually write my own assembly code and often wonder about the compilers' choices in regards to the pascal code around it,
but I don't write code "for the compiler" so sometimes I wonder why it does what it does when I apply the -O flags,
because often enough my code runs slower when I do so.
Anyhow, PosEx.
Is it an implementation of the gold standard of substring searching/pattern matching algorithms?
Is there nothing that's faster and easily available?
Google is giving me a hard time finding a fast String library for pascal.
I've been looking at KMP and Rabin-Karp, but the implementations I have don't beat PosEx,
or I'm doing something wrong.
All I really need is something that's faster running than my own pattern matching technique.
I don't want source code, just something to benchmark against, so I can beat that one too.
The fact that there's apparently no widely known library everyone uses is a bit perplexing,
further fueling my suspicion that everyone uses PosEx anyway.