search is actually rather slow. It's slow enough that I think that something just has to be wrong with it currently.
Simple loop, searching for a 32 byte (non-existing) string 1000 times in 6Mb of data: 6.96s (average over 3 runs) (862Mb/s) (this includes the time to initialize the strings, but that's rather trivial..)
search() 1000 times in pike using the same strings: Over 205 seconds (30Mb/s)
It might be a code/cache-size vs. cpu speed problem, but not only. The CPU:s are rather fast compared to memory nowdays. Almost any code will run quickly if it will fit in the codecache.