Couldn't let it sit, had to come back to day 01. Got it down to ~10ms, so I think I can leave it now.https://github.com/BaseCase/advent_of_code_2018/blob/master/dec01/with_hashmap.c …
-
Show this thread
-
Day 03! https://github.com/BaseCase/advent_of_code_2018/blob/master/dec03/overlap.c … Runs in about 9ms, which is probably not amazing but definitely good enough for me to say done.
2 replies 0 retweets 0 likesShow this thread -
Finished up Day 04 on lunch break! https://github.com/BaseCase/advent_of_code_2018/blob/master/dec04/slacking_guard.c … Takes about 5ms when given pre-sorted input. Weirdly, runtime is the same with and without optimizations, and I don't know enough about C to understand why.
1 reply 0 retweets 0 likesShow this thread -
Got part 1 of day 5 done right before work. 30ms, seems a little slow, but I can't think of a better algorithm off the top of my head. Will have to come back for part 2 at lunchtime.https://github.com/BaseCase/advent_of_code_2018/blob/master/dec05/polymers.c …
1 reply 0 retweets 1 likeShow this thread -
Day 05 Part 2 done! https://github.com/BaseCase/advent_of_code_2018/blob/master/dec05/polymers.c … ~600ms, yikes! But guess what, not gonna do any work to make it faster.
1 reply 0 retweets 1 likeShow this thread -
Realized mid-afternoon that there was an unneeded memcpy in a loop and have been waiting for the end of the workday to type in the fix. Saves about 100ms!
2 replies 0 retweets 1 likeShow this thread -
Day 06 looks hard! So instead of starting on it, I went back to my Day 5 solution and multithreaded it. This results in a lot more mallocs, but doing the work concurrently more than makes up for it. Net speedup of 2x!https://github.com/BaseCase/advent_of_code_2018/commit/70eaf5635621592c4f6f0417761d5909fb3f5c63 …
1 reply 0 retweets 0 likesShow this thread -
Stumped on day 6... :/
1 reply 0 retweets 0 likesShow this thread -
I think I came up with an algorithm that will solve it but I am out and not at a computer! Agh!
1 reply 0 retweets 0 likesShow this thread -
So I just spent over an hour debugging my program. Complex memory management, nested loops, intricate logic: all correct first try. Not correct first try? This: DO YOU SEE THE BUG? I DID NOT UNTIL JUST NOW. (but I did eventually see it, and my day 6 answer runs in about 12ms)pic.twitter.com/Df0sAgX3QK
3 replies 0 retweets 2 likesShow this thread
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.