]> git.lizzy.rs Git - rust.git/commit
Switched to the two-way algorithm for string searching
authorJonathan S <gereeter@gmail.com>
Mon, 12 May 2014 00:34:33 +0000 (19:34 -0500)
committerJonathan S <gereeter@gmail.com>
Thu, 15 May 2014 01:34:43 +0000 (20:34 -0500)
commit39cb5b13e68b4616a1f1e8dff4fd3f5241e1842a
tree86921188f1233891b02d714825429d910afbd19a
parent8a32a2a8726eb882a6e3962e40d04cad2ca9555e
Switched to the two-way algorithm for string searching

test str::bench::bench_contains_bad_naive                   ... bench:       300 ns/iter (+/- 12)     from 1309 ns/iter (+/- 36)
test str::bench::bench_contains_equal                       ... bench:       154 ns/iter (+/- 7)      from  137 ns/iter (+/- 2)
test str::bench::bench_contains_short_long                  ... bench:      2998 ns/iter (+/- 74)     from 5473 ns/iter (+/- 14)
test str::bench::bench_contains_short_short                 ... bench:        65 ns/iter (+/- 2)      from   57 ns/iter (+/- 6)
src/libcore/str.rs