in reply to Re: "my" cost
in thread "my" cost
micro optimisation of this sort can usually be beaten by either getting faster hardware or improving algorithms. You may be interested in Youtube - Matt Parker: Someone improved my code by 40,832,277,770% to see the extreme version of this comment!
Spot on Gramps, especially improving algorithms! If you don't do that, your carefully micro optimized code will likely end up as a fast slow program.
While your cited example of improving the running time from 32 days down to 0.006761 seconds is certainly extreme, it didn't really surprise me, after years (off and on) of becoming obsessed with performance challenges.
As documented in gory detail here (see The 10**21 Problem links), I remember gasping in disbelief a few years back when, obsessively working alone, I eventually coaxed some complex code into running 50 million times faster. IIRC, it took me about a year and I remember being constantly surprised when one insight led to another ... and another ... and another. When you open up performance challenges to fierce competition (especially if marioroy is involved) expect astonishing things to happen. :-)
👁️🍾👍🦟
|
---|