Why Nostr? What is Njump?
2023-12-06 12:16:55
in reply to

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

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