What is Nostr?
silmeth 🇺🇦 /
npub1skp…htf4
2023-12-06 11:16:55
in reply to nevent1q…g4wg

silmeth 🇺🇦 on Nostr: npub129gva…e4kwg I did part 2 the “correct” way because I’m impatient. So I ...

npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg (npub129g…4kwg) I did part 2 the “correct” way because I’m impatient. So I got tired of waiting for the brute force solution to finish after about ~30 seconds.

So instead of waiting 3 minutes for the result I spent 2 hours chasing weird range-operation bugs.

Mine finishes in ~37 µs on my PC (on top of input parsing which is another 43 ± 3 µs).

I do allocate a new vector for resulting ranges for every input range though.

https://gitlab.com/silmeth/advent-of-code-2023/-/blob/main/day-05/src/lib.rs#L163-200
Author Public Key
npub1skp4u4q63gfdufasesqkhjzwalacagvknkdw34hg8jmwuxqzmucqehhtf4