CodSpeedHQ
codspeed-rust
BlogDocsChangelog

feat: add some TheAlgorithm benches

#73Merged
Comparing
add-the-algorithm-benches
(
a0b46d4
) with
main
(
1ff6bcf
)
CodSpeed Performance Gauge
-48%
Improvements
2
Regressions
2
Untouched
33
New
61

Benchmarks

Failed

recursive[0]
crates/divan_compat/examples/benches/math.rs::fibonacci
Regression
CodSpeed Performance Gauge
-13%
1.9 ns2.2 ns
iterative[5]
crates/divan_compat/examples/benches/math.rs::fibonacci
Regression
CodSpeed Performance Gauge
-5%
7.9 ns8.3 ns

Improved

recursive_memoized[BTreeMap<u64, u64>, 20]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
+4%
1.8 µs1.7 µs
iterative[20]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
+3%
40.4 ns39.1 ns

New

n_queens_solver[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A9 µs
add_two_integers[(65535, -65535)]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A75.4 ns
n_queens_solver[8]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A534.2 µs
permutations[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A66 µs
rat_in_maze[8]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A929 ns
count_set_bits[1024]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A13.6 ns
sudoku
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A109.5 µs
permutations[3]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A710 ns
add_two_integers[(1024, -1024)]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A66.8 ns
find_highest_set_bit[1024]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.7 ns
rat_in_maze[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A812 ns
n_queens_solver[4]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1.6 µs
find_highest_set_bit[255]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.7 ns
hamiltonian_cycle[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A795.6 ns
knight_tour[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A8.6 ms
rat_in_maze[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A695.1 ns
generate_gray_code[3]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A453.6 ns
graph_coloring[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1.1 µs
permutations[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A14 µs
n_queens_solver[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A125.2 µs
graph_coloring[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A959 ns
permutations[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A767.7 µs
hamiltonian_cycle[4]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A551.1 ns
generate_parentheses[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A68.2 µs
find_highest_set_bit[42]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.7 ns
find_highest_set_bit[65535]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.7 ns
generate_combinations[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A2 µs
generate_parentheses[4]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A6.8 µs
subset_sum[12]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1.9 µs
generate_gray_code[5]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A1.9 µs
graph_coloring[3]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1.1 µs
rat_in_maze[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A585.6 ns
count_set_bits[65535]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A13.6 ns
subset_sum[14]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A2.1 µs
count_set_bits[255]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A13.6 ns
graph_coloring[4]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A869 ns
generate_combinations[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1.3 µs
count_set_bits[42]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A13.6 ns
hamiltonian_cycle[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A650.1 ns
knight_tour[7]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A249.9 ms
generate_combinations[8]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A3 µs
n_queens_solver[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A22.4 µs
generate_gray_code[2]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A241.4 ns
generate_gray_code[1]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A132.6 ns
permutations[4]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A2.3 µs
generate_parentheses[3]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A2.3 µs
generate_combinations[9]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A4.3 µs
knight_tour[8]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A292.7 ms
subset_sum[10]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A1 µs
subset_sum[16]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A4 µs
find_highest_set_bit[0]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.7 ns
subset_sum[18]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A4.1 µs
count_set_bits[0]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A13.6 ns
generate_gray_code[4]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A899 ns
add_two_integers[(42, 13)]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A20.9 ns
add_two_integers[(0, 0)]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A5.5 ns
generate_parentheses[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A21.7 µs
hamiltonian_cycle[6]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A711.6 ns
generate_combinations[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A779 ns
knight_tour[5]
crates/divan_compat/examples/benches/the_algorithms.rs::backtracking
CodSpeed Performance Gauge
N/A
N/A297 µs
add_two_integers[(255, 255)]
crates/divan_compat/examples/benches/the_algorithms.rs::bit_manipulation
CodSpeed Performance Gauge
N/A
N/A20.9 ns

Passed

recursive_memoized[BTreeMap<u64, u64>, 30]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
+2%
2.9 µs2.8 µs
iterative[0]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
1.7 ns1.7 ns
sort
crates/divan_compat/examples/benches/sort.rs::random
CodSpeed Performance Gauge
0%
4.9 ms4.9 ms
sort
crates/divan_compat/examples/benches/sort.rs::sorted
CodSpeed Performance Gauge
0%
137.4 µs137.3 µs
sort_unstable
crates/divan_compat/examples/benches/sort.rs::random
CodSpeed Performance Gauge
0%
3.3 ms3.3 ms
rem
crates/divan_compat/examples/benches/math.rs
CodSpeed Performance Gauge
0%
3.5 ns3.5 ns
div
crates/divan_compat/examples/benches/math.rs
CodSpeed Performance Gauge
0%
3.5 ns3.5 ns
instant
crates/divan_compat/examples/benches/time.rs::duration_since
CodSpeed Performance Gauge
0%
10.1 ns10.1 ns
mut_borrow
crates/divan_compat/benches/basic_example.rs
CodSpeed Performance Gauge
0%
7.9 ns7.9 ns
recursive_memoized[HashMap<u64, u64>, 0]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
15.8 ns15.8 ns
system_time
crates/divan_compat/examples/benches/time.rs::duration_since
CodSpeed Performance Gauge
0%
13.2 ns13.2 ns
instant
crates/divan_compat/examples/benches/time.rs::now
CodSpeed Performance Gauge
0%
38.1 ns38.1 ns
add
crates/divan_compat/examples/benches/math.rs
CodSpeed Performance Gauge
0%
2.2 ns2.2 ns
iterative[10]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
16.7 ns16.7 ns
recursive_memoized[BTreeMap<u64, u64>, 0]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
14.5 ns14.5 ns
fibo_10
crates/divan_compat/benches/basic_example.rs
CodSpeed Performance Gauge
0%
2.2 ns2.2 ns
recursive_memoized[BTreeMap<u64, u64>, 5]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
181.4 ns181.4 ns
iterative[30]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
51.3 ns51.3 ns
sort_unstable
crates/divan_compat/examples/benches/sort.rs::sorted
CodSpeed Performance Gauge
0%
109.7 µs109.7 µs
fibo_500
crates/divan_compat/benches/basic_example.rs
CodSpeed Performance Gauge
0%
446.1 ns446.1 ns
tsc (aarch64)
crates/divan_compat/examples/benches/time.rs::now
CodSpeed Performance Gauge
0%
3.1 ns3.1 ns
mul
crates/divan_compat/examples/benches/math.rs
CodSpeed Performance Gauge
0%
2.6 ns2.6 ns
recursive_memoized[HashMap<u64, u64>, 30]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
5.7 µs5.7 µs
recursive[30]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
6.1 ms6.1 ms
recursive[10]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
413.1 ns413.9 ns
recursive_memoized[HashMap<u64, u64>, 10]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
1.5 µs1.5 µs
recursive[20]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
49.7 µs49.8 µs
system_time
crates/divan_compat/examples/benches/time.rs::now
CodSpeed Performance Gauge
0%
38.1 ns38.2 ns
recursive_memoized[HashMap<u64, u64>, 5]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
573.6 ns575.1 ns
recursive_memoized[HashMap<u64, u64>, 20]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
0%
3.3 µs3.3 µs
tsc (aarch64)
crates/divan_compat/examples/benches/time.rs::duration_since
CodSpeed Performance Gauge
-1%
< 1 ns< 1 ns
recursive[5]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
-1%
33.9 ns34.3 ns
recursive_memoized[BTreeMap<u64, u64>, 10]
crates/divan_compat/examples/benches/math.rs::fibonacci
CodSpeed Performance Gauge
-1%
504.6 ns512.1 ns

Commits

Click on a commit to change the comparison range
Base
main
1ff6bcf
-47.86%
feat: implement benchmarks for TheAlgorithms (backtracking, bit_manipulation)
a0b46d4
9 months ago
by art049
© 2025 CodSpeed Technology
Home Terms Privacy Docs