Fast String Contains
Benchmarks
Criterion Benchmarks
string contains time: [7.7557 ns 7.7629 ns 7.7716 ns]
change: [-0.9531% -0.0875% +0.8345%] (p = 0.86 > 0.05)
No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
2 (2.00%) high mild
5 (5.00%) high severe
fast contains time: [5.0054 ns 5.0092 ns 5.0133 ns]
change: [-1.0042% +0.0536% +1.0664%] (p = 0.93 > 0.05)
No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) high mild
4 (4.00%) high severe
Instant::now() Benchmark
Time taken for 1000000 iterations of fast_contains: 75.262571ms
Time taken for 1000000 iterations of contains: 623.253574ms
Using the Library
Its as simple as adding the following to your Cargo.toml:
[]
= "1.0.1"
and then importing it in your code:
use fastcontains;