Skip to content

Commit 01b940a

Browse files
committed
Update benchmark data and graphs
1 parent a0063c9 commit 01b940a

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

README.md

Lines changed: 21 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 entries for the annual [Advent of Code](https://adventofcode.com/) challenge, written in performant Rust.
8+
Complete 2022 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

@@ -52,34 +52,33 @@ Complete 2022 to 2019 entries for the annual [Advent of Code](https://adventofco
5252
## Performance
5353

5454
Benchmarks are measured using the built-in `cargo bench` tool run on an Apple M2 Max.
55-
All 125 solutions from 2022 to 2019 and also 2015 complete sequentially in **422 milliseconds**.
56-
Interestingly 82% of the total time is spent on just 3 solutions.
55+
All 150 solutions from 2022 to 2019 and also 2016 to 2015 complete sequentially in **1085 milliseconds**.
56+
Interestingly 93% of the total time is spent on just 6 solutions.
5757
Performance is reasonable even on older hardware, for example a 2011 MacBook Pro with an
5858
[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)
5959
processor takes 83 milliseconds to run the 50 solutions from 2022 to 2021.
6060

6161
```mermaid
62-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#f7a35c', 'pie4': '#e4d354', 'pie5': '#e4c4fb'}}}%%
62+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#e4c4fb", "pie6": "#c6cdd5"}}}%%
6363
pie
6464
title Each year benchmark time by % of total
65+
"Year 2016" : 664
6566
"Year 2020" : 286
6667
"Year 2015" : 85
67-
"Year 2019" : 21
68-
"Year 2022" : 19
69-
"Year 2021" : 11
68+
"Years 2019, 2021 and 2022" : 51
7069
```
7170

7271
* [2022](#2022) (19 ms)
7372
* [2021](#2021) (11 ms)
7473
* [2020](#2020) (286 ms)
7574
* [2019](#2019) (21 ms)
76-
* [2016](#2016) (in progress)
75+
* [2016](#2016) (663 ms)
7776
* [2015](#2015) (85 ms)
7877

7978
## 2022
8079

8180
```mermaid
82-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#f7a35c', 'pie4': '#e4d354', 'pie5': '#e4c4fb', 'pie6': '#c6cdd5'}}}%%
81+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#e4c4fb", "pie6": "#c6cdd5"}}}%%
8382
pie
8483
title Year 2022 benchmark time by % of total
8584
"Day 20" : 7449
@@ -121,7 +120,7 @@ pie
121120
## 2021
122121

123122
```mermaid
124-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#f7a35c', 'pie4': '#e4d354', 'pie5': '#c6cdd5'}}}%%
123+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#c6cdd5"}}}%%
125124
pie
126125
title Year 2021 benchmark time by % of total
127126
"Day 15" : 2567
@@ -162,7 +161,7 @@ pie
162161
## 2020
163162

164163
```mermaid
165-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#c6cdd5'}}}%%
164+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#c6cdd5"}}}%%
166165
pie
167166
title Year 2020 benchmark time by % of total
168167
"Day 15" : 160000
@@ -201,7 +200,7 @@ pie
201200
## 2019
202201

203202
```mermaid
204-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#f7a35c', 'pie4': '#e4d354', 'pie5': '#c6cdd5'}}}%%
203+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#f7a35c", "pie4": "#e4d354", "pie5": "#c6cdd5"}}}%%
205204
pie
206205
title Year 2019 benchmark time by % of total
207206
"Day 16" : 4124
@@ -241,6 +240,15 @@ pie
241240

242241
## 2016
243242

243+
```mermaid
244+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#c6cdd5"}}}%%
245+
pie
246+
title Year 2016 benchmark time by % of total
247+
"Day 14" : 434000
248+
"Day 5" : 212000
249+
"Others" : 16696
250+
```
251+
244252
| Day | Problem | Solution | Benchmark (μs) |
245253
| --- | --- | --- | --: |
246254
| 1 | [No Time for a Taxicab](https://adventofcode.com/2016/day/1) | [Source](src/year2016/day01.rs) | 3 |
@@ -272,7 +280,7 @@ pie
272280
## 2015
273281

274282
```mermaid
275-
%%{init: {'theme': 'base', 'themeVariables': { 'pie1': '#7cb5ec', 'pie2': '#90ed7d', 'pie3': '#c6cdd5'}}}%%
283+
%%{init: {"themeVariables": { "pie1": "#7cb5ec", "pie2": "#90ed7d", "pie3": "#c6cdd5"}}}%%
276284
pie
277285
title Year 2015 benchmark time by % of total
278286
"Day 4" : 76000

0 commit comments

Comments
 (0)