Go to file
Jonathan Chan a0df5a759c Semigroup has been added to Prelude, so implementations of Monoid were
broken. For day 20, use of the AC-Vector library has been replaced with
various implementations of typeclasses necessary to make everything
work. Extra packages used have also been added to the README.
2018-07-29 11:40:30 -07:00
.gitignore Day 23, part 2 - decompiled input by hand 2017-12-23 11:44:16 -08:00
01.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
01.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
02.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
02.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
03.hs Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
04.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
04.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
05.hs Day 5 - very slight performance improvement with strictness during recursion 2017-12-23 17:32:25 -08:00
05.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
05_alt.hs Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
06.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
06.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
07.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
07.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
07_cumulate.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
07_tree.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
08.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
08.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
09.hs Fixed input imports due to 0 prefix for days 01 to 09. 2017-12-17 16:11:13 -08:00
09.txt Prepended single-digit files with 0s for nice ordering. 2017-12-12 09:29:13 -08:00
10.hs Day 10 - condensed a lot of functions and used normal lists instead of Seq 2017-12-12 09:29:07 -08:00
10.txt Day 10 2017-12-12 09:29:07 -08:00
11.hs Semigroup has been added to Prelude, so implementations of Monoid were 2018-07-29 11:40:30 -07:00
11.txt Day 11 2017-12-12 09:29:07 -08:00
12.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
12.txt Day 12, plus some edits to days 1 and 2 2017-12-12 09:29:10 -08:00
13.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
13.txt Day 13 2017-12-12 22:59:14 -08:00
14.hs Day 14 - performance improvements using strictness 2017-12-23 17:15:35 -08:00
15.hs Day 15 - removed old solution in favour of faster strict solution 2017-12-16 11:14:01 -08:00
16.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
16.txt Day 16 - how to do part 2 without taking 3 years �� 2017-12-16 11:09:58 -08:00
17.hs Day 17 - very slight performance improvement by making oneth strict 2017-12-23 17:23:29 -08:00
17.js Day 17 - it's a lot faster in Javascript... 2017-12-16 23:44:08 -08:00
18.txt Day 18 - beginnings of a solution, but it's late and I need to sleep 2017-12-18 02:02:47 -08:00
18a.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
18b.hs Minor refactoring - replaced all fmaps with <$> (idk why I kept using fmaps in the first place) 2017-12-19 23:40:38 -08:00
19.hs Day 19 2017-12-18 23:45:10 -08:00
19.txt Day 19 2017-12-18 23:45:10 -08:00
20.hs Semigroup has been added to Prelude, so implementations of Monoid were 2018-07-29 11:40:30 -07:00
20.txt Day 20 2017-12-19 23:13:41 -08:00
21.hs Day 21 - refactoring for clarity and conciseness 2017-12-21 13:58:44 -08:00
21.txt Day 21 - refactoring for clarity and conciseness 2017-12-21 13:58:44 -08:00
22.txt Day 22 2017-12-22 00:37:21 -08:00
22a.hs Day 22 - minor refactoring 2017-12-22 13:06:37 -08:00
22b.hs Day 22 - minor refactoring 2017-12-22 13:06:37 -08:00
23.hs Day 23 - off-by-one error >:[ 2017-12-24 01:14:34 -08:00
23.txt Day 23, part 1 2017-12-22 23:02:20 -08:00
23b.c Day 23 - off-by-one error >:[ 2017-12-24 01:14:34 -08:00
24.hs Day 24, a day late because I'm on vacation :/ 2017-12-25 08:40:14 -08:00
24.txt Day 24, a day late because I'm on vacation :/ 2017-12-25 08:40:14 -08:00
25.hs Day 25 - AoC 2017 all done :) 2017-12-25 16:16:27 -08:00
25.txt Day 25 - AoC 2017 all done :) 2017-12-25 16:16:27 -08:00
README.md Semigroup has been added to Prelude, so implementations of Monoid were 2018-07-29 11:40:30 -07:00

README.md

Advent of Code 2017

Hopefully most of these solutions are fairly self-explanatory. I'll write longer-length explanations for more complex questions.

Posts

Day 3: Spiral Memory (problem description)

Day 23: Coprocessor Conflagration (problem description)

Runtimes

These are the runtimes of only one trial but the variances are fairly small and the focus is on the differences in runtime among the different solutions to see which have comparatively worse performance.

Day Runtime (s) With -O2
01 0.044
02 0.078
03 0.074
04 0.082
05 16.833 10.975
06 0.398
07 0.148
08 0.137
09 0.102
10 0.340
11 0.119
12 0.168
13 2.136 0.503
14 4.360 3.495
15 62.242 3.488
16 0.462
17 6.753 1.865
18 0.118
19 0.026
20 0.168
21 4.013
22 12.867 7.880
23 0.274
24 6.887
25 6.072

Problems that could use some work: 05, 22, 24, 25, 14, 15, 21, 17

Problems that are good enough with optimizations: 13

Dependencies

I haven't gotten Stack set up with this project (I'll do it next year!), so here's a list of the extra dependencies needed by various files.

  • hashmap
  • matrix
  • split
  • tuple
  • unordered-containers
  • vector