Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Optimization by reduction

One thing that's changed the way I think about performance is realizing the fastest computation isn't a faster computation. It's the one you prove you don't have to do again.

People usually jump straight to threads, GPUs, SIMD, faster hardware, etc.

But if a workload has enough repeated structure, sometimes the bigger win is identifying what is actually invariant and only recomputing what changed.

Sounds obvious when you say it out loud, but I think a ridiculous amount of software still brute-forces basically the same work over and over again.

Been fascinated with this lately, has anyone been hyper-optimized with that line of process?
Most people just understand that working is better than quick, unless you have a need for speed you're usually better to just get it working, then of course you remove the Thread.Sleep calls from your code ;)
[Image: 3.gif]
(Aug 11, 2026 03:05 PM)Terry A. Davis Wrote:  Most people just understand that working is better than quick, unless you have a need for speed you're usually better to just get it working, then of course you remove the Thread.Sleep calls from your code ;)

totally agree, over preemptive optimization has hurt me more in that long run, get it working first, optimize second, collect my thread.sleep calls and speed up
Pretty much - You shouldn't design for speed unless it's a need of the application.

Optimization comes from understanding the repeat process and how you either shortcut the process, or better still, see the way it works underlying so you can mitigate what steps you can.
[Image: 3.gif]
yep, totally agree


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Shadow ReignOct 28, 2016 06:33 PM 3 175 Oct 28, 2016 06:33 PM
Last Post: datguy.dev
[Userscript] by SakutoJul 3, 2016 08:37 PM 47 3,624 Jul 3, 2016 08:37 PM
Last Post: Laughing Man
by FroninNov 8, 2014 07:30 PM 5 94 Nov 8, 2014 07:30 PM
Last Post: Canonsx130