Hacker News new | ask | show | jobs
by projectdelphai 2072 days ago
I mean maybe but if you told me you could take my code that runs in less than a second and make it more readable but it would take 30 minutes to run instead . . . hell no I'm not taking you up on your offer. I'll just comment and document the existing solution better and call it a day.
1 comments

You're missing the point.

The solution here is faster than the absolute naive solution of finding all distances, but it is both slower and less readable than integer math grid conversion..

I could see why you would make the choice of the naive, slow solution. I could see why you would choose the fast, integer math grid conversion one. But I don't see why you would choose something slower than the optimum solution that is also much, much less readable.

That is, the naive solution and the integer math solution are Pareto-optimal choices... and this abomination ain't.