14,000x Speedup (2015)
james.hiebert.name
14,000x Speedup (2015)
1–10 of 237 posts
Re: 14,000x Speedup (2015)
#2I find optimization porn like this to be so satisfying.
Re: 14,000x Speedup (2015)
#3You could get arbitrarily large improvements by starting with even worse code ;)
Re: 14,000x Speedup (2015)
#4If your grid is well-behaved enough you can go a lot faster still using locality sensitive hashing.
Re: 14,000x Speedup (2015)
#5I’m not sure why we can’t map a position in a big grid to a position in a small grid by doing:
X = Math.floor(bigX / bigXMax * smallXMax)
Is there some magic here I’m not seeing?
Re: 14,000x Speedup (2015)
#6I’m not sure why we can’t map a position in a big grid to a position in a small grid by doing: X = Math.floor(bigX / bigXMax * smallXMax) Is there some magic here I’m not seeing?
Grid doesn't need to be regular
Re: 14,000x Speedup (2015)
#7> Furthermore, there is literally no way to tell whether your program will ever actually terminate without actually executing it.
This is technically not correct, is it? Or at least phrased a bit poorly. Maybe replace "your" with "any given"?
Re: 14,000x Speedup (2015)
#8> Furthermore, there is literally no way to tell whether your program will ever actually terminate without actually executing it. This is technically not correct, is it? Or at least phrased a bit poorly. Maybe replace "your" with "any given"?
Correct, not all programs suffer from the Halting Problem.
Re: 14,000x Speedup (2015)
#9I fantasize about coming across optimization opportunities like this in real life.
Re: 14,000x Speedup (2015)
#10You could get arbitrarily large improvements by starting with even worse code ;)
Exactly. I like the enthusiasm of the author; but the self-congratulatory attitude doesnt go down very well if you should actually be ashamed of the first version. I mean it is only a few inches from:"you know in the old days we had to flip through the telephone directory from front to end to find a name. But you know what: it is actually a sorted list, so we applied a binary search algorithm and are 14000x faster. Tl;dr CS for the win"