Whole-known-network
<p><span class="h-card" translate="no"><a href="https://toot.wales/@ChrisWere" class="u-url mention">@<span>ChrisWere</span></a></span> If you don't want opinions, you shouldn't follow me on social media</p>
<p><span class="h-card"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> </p><p>All compilers I've seen can do this optimization. See for example <a href="https://godbolt.org/z/v34E58deK" target="_blank" rel="nofollow noopener noreferrer"><span class="invisible">https://</span><span class="">godbolt.org/z/v34E58deK</span><span class="invisible"></span></a>, which has the "add a fixup from the upper word of the multiplication result". The reason why it's necessary is that you don't actually want multiplicative inverse modulo 2^wordsize in the case when the input value is not divisible by the constant.</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@gamingonlinux" class="u-url mention">@<span>gamingonlinux</span></a></span> Muting and just blocking people who moan is probably worth doing.</p><p>I do appreciate you and what you do.</p><p>Perhaps, you could think about joining us at Linux App Summit next year in April? :)</p>
<p><span class="h-card" translate="no"><a href="https://discuss.systems/@steve" class="u-url mention">@<span>steve</span></a></span> plenty of repeated work, but whatev!</p>
<p><span class="h-card" translate="no"><a href="https://discuss.systems/@steve" class="u-url mention">@<span>steve</span></a></span> he built part 1 from a shortest path code he had sitting around from some class, so for part 2 he just ran it in both directions from every grid point</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@gamingonlinux" class="u-url mention">@<span>gamingonlinux</span></a></span> nice! Need to pick that game back up again as I’ve been distracted by others lately.</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> if you have a solution for part 1, you ought to basically be there. You can either continue your search until you identify all paths with equal cost, and then backtrack through your data structures to find the cells (this can be efficient because the adjacencies are trivial).</p><p>Alternatively you can do the dumb thing I did because I was lazy and just attach a set of all the squares in the history to the state in your data structures, and take their union when you find another path to the same state.</p><p>I haven't coded up option 1 because who has time for that, but it should be 50-100x faster on the inputs in question.</p>
<p><span class="h-card" translate="no"><a href="https://discuss.systems/@steve" class="u-url mention">@<span>steve</span></a></span> I think we just worked out the right algorithm for part 2 of of last night's problem, he's coding on it now :)</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> Actually managing to make time to do it this year, for the first time in a long time.</p>