Stefan Harmuth
|
91f4d095f1
|
day20: limit transformations to the absolute necessary
|
2020-12-20 21:34:52 +01:00 |
|
Stefan Harmuth
|
4c9e7f2838
|
day20: comment to clarify the == 4
|
2020-12-20 20:23:26 +01:00 |
|
Stefan Harmuth
|
961fc2a8cb
|
day20: don't re-build possible border lists every loop
|
2020-12-20 20:19:32 +01:00 |
|
Stefan Harmuth
|
db841e474f
|
day20: in p2 restrict p1 to only what we need
|
2020-12-20 10:25:23 +01:00 |
|
Stefan Harmuth
|
0098cac688
|
day20: at least remove your debug output
|
2020-12-20 10:21:43 +01:00 |
|
Stefan Harmuth
|
10ffd11c46
|
day20: raw (ugly) version
|
2020-12-20 10:18:12 +01:00 |
|
Stefan Harmuth
|
5accf0f63b
|
day19: lean on the solution for p2 and split the checks in two (much!) smaller lists -> from 1.1s down to 8ms
|
2020-12-19 09:44:25 +01:00 |
|
Stefan Harmuth
|
80a918cd69
|
day19: converting to a set() first makes the lookups faster
|
2020-12-19 09:35:41 +01:00 |
|
Stefan Harmuth
|
0a1fcb9ed9
|
day19: raw version
|
2020-12-19 09:02:46 +01:00 |
|
Stefan Harmuth
|
5d82af1ebe
|
day18: raw version
|
2020-12-18 07:20:31 +01:00 |
|
Stefan Harmuth
|
d162555dfa
|
day17: missed one var substitution
|
2020-12-17 08:47:54 +01:00 |
|
Stefan Harmuth
|
faaa50240d
|
day17: just count active neighbours when there is actually an active neighbour
|
2020-12-17 07:34:46 +01:00 |
|
Stefan Harmuth
|
e62fe76949
|
day17: raw version
|
2020-12-17 06:27:36 +01:00 |
|
Stefan Harmuth
|
66ad0f3f70
|
day16: faster and more readable
|
2020-12-16 08:03:59 +01:00 |
|
Stefan Harmuth
|
2d6dd0e074
|
day16: cleaner code
|
2020-12-16 07:46:55 +01:00 |
|
Stefan Harmuth
|
07d49a707b
|
day16 - raw version
|
2020-12-16 06:51:06 +01:00 |
|
Stefan Harmuth
|
5bda75e144
|
day15 - shorter, faster, still too slow
|
2020-12-15 06:46:48 +01:00 |
|
Stefan Harmuth
|
017e04a27c
|
day15 - raw solution
|
2020-12-15 06:29:38 +01:00 |
|
Stefan Harmuth
|
7fa39e155d
|
day14 - raw solution
|
2020-12-14 07:33:18 +01:00 |
|
Stefan Harmuth
|
3166129ed6
|
day13: remove unused import
|
2020-12-13 11:21:53 +01:00 |
|
Stefan Harmuth
|
3cb30170e2
|
day13: TIL: Chinese Remainder Theorem
|
2020-12-13 11:21:06 +01:00 |
|
Stefan Harmuth
|
b3c49e5353
|
day12: it's a little bit slower, but I like the cleaner code
|
2020-12-12 11:20:30 +01:00 |
|
Stefan Harmuth
|
38032fbb6e
|
day12: no need to re-evaluate where in p2
|
2020-12-12 06:53:18 +01:00 |
|
Stefan Harmuth
|
20e35877e2
|
day12: use acceptable variable names
|
2020-12-12 06:47:05 +01:00 |
|
Stefan Harmuth
|
3c1a4269f8
|
Merge remote-tracking branch 'origin/master'
|
2020-12-12 06:34:54 +01:00 |
|
Stefan Harmuth
|
1f61c4b97d
|
day12
|
2020-12-12 06:34:48 +01:00 |
|
Stefan Harmuth
|
033a31a7c0
|
day11: remove another 2 dict-accesses
|
2020-12-11 13:52:48 +01:00 |
|
Stefan Harmuth
|
6df1f468d3
|
day11: ever so slightly faster - still 2s +/- 0.2
|
2020-12-11 12:35:36 +01:00 |
|
Stefan Harmuth
|
c3cced9c4d
|
day11: down to ~2s (and found the flaw in p2)
|
2020-12-11 11:58:35 +01:00 |
|
Stefan Harmuth
|
4dc83760b7
|
day11: slightly faster (and actually correct)
|
2020-12-11 11:00:59 +01:00 |
|
Stefan Harmuth
|
ef7fb6e53e
|
day 11 - slow
|
2020-12-11 08:08:42 +01:00 |
|
Stefan Harmuth
|
cd78620ec3
|
finally it clicked for d9p2
|
2020-12-10 15:28:17 +01:00 |
|
Stefan Harmuth
|
490978ff9b
|
day 10
|
2020-12-10 07:47:12 +01:00 |
|
Stefan Harmuth
|
e666a78ba1
|
day9 optimizations
|
2020-12-10 05:49:09 +01:00 |
|
Stefan Harmuth
|
9bd530c097
|
remove ununsed import
|
2020-12-09 06:43:01 +01:00 |
|
Stefan Harmuth
|
0bfa735129
|
day 9: optimizations and beautifications
|
2020-12-09 06:42:08 +01:00 |
|
Stefan Harmuth
|
31eeead0f7
|
day 9 p1 simplified
|
2020-12-09 06:30:27 +01:00 |
|
Stefan Harmuth
|
9391bc2b12
|
Merge remote-tracking branch 'origin/master'
|
2020-12-09 06:21:55 +01:00 |
|
Stefan Harmuth
|
76d238fc7b
|
day 9
|
2020-12-09 06:21:48 +01:00 |
|
Stefan Harmuth
|
a8a0873eec
|
pre-optimizing the opcode makes p1 take twice the time, but p2 almost twice as fast
|
2020-12-08 10:51:26 +01:00 |
|
Stefan Harmuth
|
8277dfe0f9
|
we only need to check the instructions up to the infinite loop - everything else cannot contain the error
|
2020-12-08 09:43:28 +01:00 |
|
Stefan Harmuth
|
761e3bf975
|
only check for 'nop' if the check for 'jmp' failes. Saves 0.5ms :)
|
2020-12-08 09:12:24 +01:00 |
|
Stefan Harmuth
|
b4ff7c58d0
|
TIL: enumerate() exists; no more manual counting
|
2020-12-08 09:09:50 +01:00 |
|
Stefan Harmuth
|
aa5ae674ec
|
only int-cast param when needed
|
2020-12-08 09:04:38 +01:00 |
|
Stefan Harmuth
|
9b0b8eb1f6
|
makes parsing minimally faster (and also more readable)
|
2020-12-08 08:55:18 +01:00 |
|
Stefan Harmuth
|
29b0604952
|
[:] does the same and is minimally faster than .copy()
|
2020-12-08 06:36:24 +01:00 |
|
Stefan Harmuth
|
f9a0472f85
|
this is not an f-string anymore
|
2020-12-08 06:24:27 +01:00 |
|
Stefan Harmuth
|
aa07b45ba7
|
day 8
|
2020-12-08 06:23:43 +01:00 |
|
Stefan Harmuth
|
bc64ff468d
|
use python's own timeit module instead of our own halfbaked implementation
|
2020-12-07 11:00:58 +01:00 |
|
Stefan Harmuth
|
8eecddaf60
|
note to myself: set()s are much faster than list()s and auto-eliminate duplicates
|
2020-12-07 10:35:09 +01:00 |
|