String search in a binary

Magnus Thoäng magnus.thoang@REDACTED
Thu Dec 2 12:53:27 CET 2004


Magnus Thoäng wrote:
> IIRC, the string:str function is a brute-force text search, so you don't 
> gain any performance by using it.
 > ...

Ooops. This was not true.

Some testing reveals that traversing a list (as in string:str/2) is 
faster than traversing a binary in the way I suggested...

Sorry :-)

-- 
Magnus Thoäng



More information about the erlang-questions mailing list