Commit Graph

51 Commits

Author SHA1 Message Date
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
Stefan Harmuth
aa29aaedd4 day 7 2020-12-07 06:54:43 +01:00
Stefan Harmuth
a1e946494b get rid of numpy makes it >10x faster 2020-12-06 08:44:55 +01:00
Stefan Harmuth
6aa821c6f4 day 6 + central testing 2020-12-06 08:16:26 +01:00
Stefan Harmuth
d4380883b2 add execution time measuring 2020-12-05 12:16:30 +01:00
Stefan Harmuth
3e8103fd39 day 5 2020-12-05 06:36:47 +01:00
Stefan Harmuth
5389f899d5 no need to check further if a match has been found 2020-12-04 08:52:33 +01:00
Stefan Harmuth
a70f2daf7f day 4 2020-12-04 07:06:51 +01:00
Stefan Harmuth
a3d2b5140f better (and faster) solution 2020-12-03 11:00:59 +01:00
Stefan Harmuth
fcd394aaba more input process options 2020-12-03 09:57:10 +01:00
Stefan Harmuth
95e56b9333 day3 2020-12-03 07:05:29 +01:00
Stefan Harmuth
f70c759582 build in asserts when running single day scripts 2020-12-02 10:57:53 +01:00
Stefan Harmuth
d49d0bb8fe getting rid of exec() and ugly "TEST in globals()" 2020-12-02 10:26:00 +01:00
Stefan Harmuth
5f1e68270b day2 2020-12-02 09:17:39 +01:00
Stefan Harmuth
6348ae58a3 add test option 2020-12-01 11:27:01 +01:00
Stefan Harmuth
a0408e9873 stop pycharm from complaining :) 2020-12-01 08:41:32 +01:00
Stefan Harmuth
b5d4852d82 main.py running all days 2020-12-01 08:40:31 +01:00