←back to thread

Speed matters (2021)

(www.scattered-thoughts.net)
65 points mefengl | 9 comments | | HN request time: 0.459s | source | bottom
1. inglor_cz ◴[] No.43111564[source]
I agree fully. Speed matters. Too many people consider CPU time too cheap to consider. I still marvel at how fast and efficient could Symbian OS be on a 190 MHz Nokia. (Though the API was hell.)

That said, it is also true that premature optimization is the root of all evil.

I suspect programming wisdom hides somewhere in between those two hills, neither of which is worth dying on.

replies(4): >>43111586 #>>43111588 #>>43111643 #>>43116423 #
2. rockwotj ◴[] No.43111586[source]
Yeah be data driven and optimize the hot data path, the other code paths optimize for simplicity (and the majority of a system is the latter)
3. hansvm ◴[] No.43111588[source]
That's an interesting point as well, but the entire article seems to me to be focused on programmer speed rather than program speed. What about it spoke to the latter rather than the former for you?
replies(1): >>43111618 #
4. inglor_cz ◴[] No.43111618[source]
Specifically the SQLite release statement. Quite recently, I did the same in my code, fishing for many micro-optimizations that sped up the execution by 1 per cent or so. These added up nicely.
5. Aurornis ◴[] No.43111643[source]
Well the article is about speed of development, not the speed at which the code runs.

Over the years I’ve come to embrace moving fast and writing code quickly, even if it’s not the fastest. The faster I get the big things done, the more time I can spend optimizing what matters after I’ve identified it and determined it’s valuable.

replies(2): >>43111736 #>>43111739 #
6. inglor_cz ◴[] No.43111736[source]
There is an overlap.

Writing for PHP, I used to spend a lot of time waiting for Xdebug to trigger. Once the author released version 3.3, the improvement was so big that my own productivity went visibly up.

7. branko_d ◴[] No.43111739[source]
On the other hand, some of the biggest performance wins come from the architectural choices, and those are often done before most of the code is written.
replies(1): >>43113190 #
8. whstl ◴[] No.43113190{3}[source]
Yep, same experience. "Some of the biggest performance wins" in both developer speed and processing speed.
9. tmtvl ◴[] No.43116423[source]
> premature optimization is the root of all evil.

Yeah, we should forget about small efficiencies, say about 97% of the time. Yet we should not pass up our opportunities in that critical 3%.