Benchmarking Sets and Vectors To see when a linear scan of a vector is faster than a lookup in a set. To get started, assuming you have Cargo installed, just run the following: cargo bench You can edit any of the benchmarks in benches/my_benchmark.rs.