Skip to content

Commit 77a2202

Browse files
committed
Update benchmark data and graphs
1 parent f53bd70 commit 77a2202

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[docs-badge]: https://img.shields.io/github/actions/workflow/status/maneatingape/advent-of-code-rust/docs.yml?color=blue&label=docs
66
[docs-link]: https://maneatingape.github.io/advent-of-code-rust/aoc/
77

8-
Complete 2022 to 2019 and 2016 to 2015 entries for the annual [Advent of Code](https://adventofcode.com/) challenge, written in performant Rust.
8+
Complete 2023 to 2019 and 2016 to 2015 entries for the annual [Advent of Code](https://adventofcode.com/) challenge, written in performant Rust.
99

1010
## Features
1111

@@ -29,21 +29,21 @@ Place input files in `input/yearYYYY/dayDD.txt` including leading zeroes. For ex
2929

3030
**Run**
3131
* Everything `cargo run`
32-
* Specific year `cargo run year2022`
33-
* Specific day `cargo run year2022::day01`
32+
* Specific year `cargo run year2023`
33+
* Specific day `cargo run year2023::day01`
3434
* Release profile (faster) `cargo run --release`
3535
* Optimized for current CPU architecture (fastest) `RUSTFLAGS="-C target-cpu=native" cargo run --release`
3636

3737
**Test**
3838
* Everything `cargo test`
39-
* Specific year `cargo test year2022`
40-
* Specific day `cargo test year2022::day01`
39+
* Specific year `cargo test year2023`
40+
* Specific day `cargo test year2023::day01`
4141
* Show STDOUT for debugging `cargo test -- --nocapture`
4242

4343
**Benchmark**
4444
* Everything `cargo bench`
45-
* Specific year `cargo bench year2022`
46-
* Specific day `cargo bench year2022::day01`
45+
* Specific year `cargo bench year2023`
46+
* Specific day `cargo bench year2023::day01`
4747

4848
**Document**
4949
* Build docs including private items `cargo doc --document-private-items`
@@ -57,12 +57,13 @@ Place input files in `input/yearYYYY/dayDD.txt` including leading zeroes. For ex
5757

5858
## Performance
5959

60-
Benchmarks are measured using the built-in `cargo bench` tool run on an Apple M2 Max.
61-
All 150 solutions from 2022 to 2019 and also 2016 to 2015 complete sequentially in **1.1 seconds**.
62-
Interestingly 93% of the total time is spent on just 6 solutions.
60+
Benchmarks are measured using the built-in `cargo bench` tool run on an
61+
[Apple M2 Max](https://en.wikipedia.org/wiki/Apple_M2).
62+
All 175 solutions from 2023 to 2019 and also 2016 to 2015 complete sequentially in **1.1 seconds**.
63+
Interestingly 90% of the total time is spent on just 5 solutions.
6364
Performance is reasonable even on older hardware, for example a 2011 MacBook Pro with an
6465
[Intel i7-2720QM](https://ark.intel.com/content/www/us/en/ark/products/50067/intel-core-i72720qm-processor-6m-cache-up-to-3-30-ghz.html)
65-
processor takes 4.4 seconds to run the same 150 solutions.
66+
processor takes 4.1 seconds to run the same 175 solutions.
6667

6768
```mermaid
6869
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#e4c4fb", "pie6": "#c6cdd5"}}}%%
@@ -71,10 +72,10 @@ pie
7172
"Year 2016" : 663
7273
"Year 2020" : 286
7374
"Year 2015" : 87
74-
"Years 2019, 2021 and 2022" : 42
75+
"Years 2019, 2021, 2022 and 2023" : 52
7576
```
7677

77-
* [2023](#2023) (in progress)
78+
* [2023](#2023) (10 ms)
7879
* [2022](#2022) (10 ms)
7980
* [2021](#2021) (10 ms)
8081
* [2020](#2020) (286 ms)
@@ -85,6 +86,17 @@ pie
8586

8687
## 2023
8788

89+
```mermaid
90+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#c6cdd5"}}}%%
91+
pie
92+
title Year 2023 benchmark time by % of total
93+
"Day 23" : 3181
94+
"Day 17" : 2463
95+
"Day 12" : 1150
96+
"Day 16" : 831
97+
"Others" : 2206
98+
```
99+
88100
| Day | Problem | Solution | Benchmark (μs) |
89101
| --- | --- | --- | --: |
90102
| 1 | [Trebuchet?!](https://adventofcode.com/2023/day/1) | [Source](src/year2023/day01.rs) | 35 |

0 commit comments

Comments
 (0)