A tester accepts following three arguments

tester haystack_size type needle_size
   - type can be
     - random generate random strings
     - aaab  match aaa...b versus aaa...b
     - planted:file see below

With planted you can specify occurrences of needle partial matches. Needle is generated randomly, haystack is random according to given distribution. For example a file planted1 contains

10 0  # 20% probability that character does not match anything
20 1  # 40% that it matches start of needle but not more
20 5  # 40% that it belong to five consecutive characters that form start of needle.

And optional parameters:

ALIGNED - accepts values be random/aligned/unaligned, default random.


In html directory following files are generated

strstr.html average instructions for given parameters

strstr_r.html average instructions per haystack character for given parameters

None: benchmarking/strstr (last edited 2012-05-21 20:47:23 by neleai)