z-logo
Premium
Technology beats algorithms (in exact string matching)
Author(s) -
Tarhio Jorma,
Holub Jan,
Giaquinta Emanuele
Publication year - 2017
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.2511
Subject(s) - string searching algorithm , computer science , string (physics) , simd , algorithm , commentz walter algorithm , pattern matching , matching (statistics) , order (exchange) , loop (graph theory) , parallel computing , mathematics , combinatorics , artificial intelligence , statistics , finance , economics , mathematical physics
Summary More than 120 algorithms have been developed for exact string matching within the last 40 years. We show by experiments that the naïve algorithm exploiting SIMD instructions of modern CPUs (with symbols compared in a special order) is the fastest one for patterns of length up to about 50 symbols and extremely good for longer patterns and small alphabets. The algorithm compares 16 or 32 characters in parallel by applying SSE2 or AVX2 instructions, respectively. Moreover, it uses loop peeling to further speed up the searching phase. We tried several orders for comparisons of pattern symbols, and the increasing order of their probabilities in the text was the best.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here