mirror of
https://github.com/RussellChamp/advent-of-code-2024-rust.git
synced 2026-10-27 23:52:29 +00:00
remove diagnostics update benchmarks
This commit is contained in:
1 parent
680c9547e4
commit
54c5667958
2 files changed
+26
-26
No files matched your search
@@ -24,26 +24,26 @@ Solutions for [Advent of Code](https://adventofcode.com/) in [Rust](https://www.
|
||||
| [Day 12](https://adventofcode.com/2024/day/12) | ⭐ | |
|
||||
<!--- advent_readme_stars table --->
|
||||
|
||||
<!--- benchmarking table --->
|
||||
## Benchmarks
|
||||
|
||||
| Day | Part 1 | Part 2 |
|
||||
| :---: | :---: | :---: |
|
||||
| [Day 1](./src/bin/01.rs) | `126.9µs` | `218.4µs` |
|
||||
| [Day 2](./src/bin/02.rs) | `190.5µs` | `487.3µs` |
|
||||
| [Day 3](./src/bin/03.rs) | `524.3µs` | `678.5µs` |
|
||||
| [Day 4](./src/bin/04.rs) | `3.7ms` | `495.5µs` |
|
||||
| [Day 5](./src/bin/05.rs) | `43.2ms` | `-` |
|
||||
| [Day 6](./src/bin/06.rs) | `59.8µs` | `-` |
|
||||
| [Day 7](./src/bin/07.rs) | `11.9ms` | `-` |
|
||||
| [Day 8](./src/bin/08.rs) | `106.2µs` | `-` |
|
||||
| [Day 9](./src/bin/09.rs) | `1.0ms` | `-` |
|
||||
| [Day 10](./src/bin/10.rs) | `10.1ms` | `-` |
|
||||
| [Day 11](./src/bin/11.rs) | `1.9s` | `-` |
|
||||
| [Day 12](./src/bin/12.rs) | `4.5ms` | `-` |
|
||||
| [Day 13](./src/bin/13.rs) | `3.1ms` | `-` |
|
||||
|
||||
**Total: 1980.39ms**
|
||||
<!--- benchmarking table --->
|
||||
## Benchmarks
|
||||
|
||||
| Day | Part 1 | Part 2 |
|
||||
| :---: | :---: | :---: |
|
||||
| [Day 1](./src/bin/01.rs) | `126.9µs` | `218.4µs` |
|
||||
| [Day 2](./src/bin/02.rs) | `190.5µs` | `487.3µs` |
|
||||
| [Day 3](./src/bin/03.rs) | `524.3µs` | `678.5µs` |
|
||||
| [Day 4](./src/bin/04.rs) | `3.7ms` | `495.5µs` |
|
||||
| [Day 5](./src/bin/05.rs) | `43.2ms` | `-` |
|
||||
| [Day 6](./src/bin/06.rs) | `59.8µs` | `-` |
|
||||
| [Day 7](./src/bin/07.rs) | `11.9ms` | `-` |
|
||||
| [Day 8](./src/bin/08.rs) | `106.2µs` | `-` |
|
||||
| [Day 9](./src/bin/09.rs) | `1.0ms` | `-` |
|
||||
| [Day 10](./src/bin/10.rs) | `10.1ms` | `-` |
|
||||
| [Day 11](./src/bin/11.rs) | `1.9s` | `-` |
|
||||
| [Day 12](./src/bin/12.rs) | `4.5ms` | `-` |
|
||||
| [Day 13](./src/bin/13.rs) | `2.7ms` | `719.8µs` |
|
||||
|
||||
**Total: 1980.71ms**
|
||||
<!--- benchmarking table --->
|
||||
|
||||
---
|
||||
|
||||
+6
-6
@@ -69,7 +69,7 @@ pub fn part_two(input: &str) -> Option<u64> {
|
||||
Machine { a_button, b_button, prize }
|
||||
}).collect_vec();
|
||||
|
||||
println!("PROCESSING {} MACHINES", machines.len());
|
||||
// println!("PROCESSING {} MACHINES", machines.len());
|
||||
let wins = machines.iter().filter_map(|Machine { a_button, b_button, prize }| {
|
||||
|
||||
let denom = (a_button.x * b_button.y) - (a_button.y * b_button.x );
|
||||
@@ -77,23 +77,23 @@ pub fn part_two(input: &str) -> Option<u64> {
|
||||
let b_numer = (prize.y * a_button.x) - (prize.x * a_button.y);
|
||||
|
||||
if a_numer % denom != 0 || b_numer % denom != 0 {
|
||||
print!("❌");
|
||||
// print!("❌");
|
||||
return None;
|
||||
}
|
||||
|
||||
let a_presses = a_numer / denom;
|
||||
let b_presses = b_numer / denom;
|
||||
|
||||
print!("✔️ ");
|
||||
// print!("✔️ ");
|
||||
Some(3 * a_presses + b_presses)
|
||||
// println!("MATCHES {:?}", matches);
|
||||
}).collect_vec();
|
||||
|
||||
println!();
|
||||
println!("WON {} PRIZES!", wins.len());
|
||||
// println!();
|
||||
// println!("WON {} PRIZES!", wins.len());
|
||||
|
||||
let total_tokens: isize = wins.into_iter().sum();
|
||||
println!("COST {} TOKENS!", total_tokens);
|
||||
// println!("COST {} TOKENS!", total_tokens);
|
||||
Some(total_tokens as u64)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user