News for hackers. Stuff that matters.
Re:Speed Is the Killer Feature by josephg on Tuesday March 02, 2021 @07:21AM (#26314520)
I totally agree. I think about it like, you spend $3000 on a computer. $100 goes into actually doing your computing. The rest is thrown away by lazy programmers who can’t be bothered to learn how a profiler works. Most software is written the same way a lazy college student treats their dorm room - all available resources (surfaces) are filled before anything gets cleaned up. Getting a bigger room provides temporary relief before they just make more mess to fill the space.
Re:Speed Is the Killer Feature by zwirbl on Tuesday March 02, 2021 @07:35AM (#26314638)
Wirth's law is a reality, an awful, horribly annoying one
Re:Speed Is the Killer Feature by Pxtl on Tuesday March 02, 2021 @11:51AM (#26317298)
"can't be bothered to learn how a profiler works"

To be fair, profiling is way more difficult than it was in the days of single-core local applications. A single-threaded single-machine application means you can get a very clear and simple tree-chart of where your program's time is spent, and the places to optimize are dead obvious.

Even if you're using async/await but are basically mostly releasing the thread and awaiting the response, the end-user experience of that time is the same - they don't give a crap that you're being thoughtful to the processor if it's still 0.5s of file IO before they can do anything, but now the profiler is lying to you and saying "nope, the processor isn't spending any time in that wait, your program is fast!".

Re:Speed Is the Killer Feature by toast0 on Tuesday March 02, 2021 @02:54PM (#26319718)
> To be fair, profiling is way more difficult than it was in the days of single-core local applications.

Not if you graduated from the printf school of profiling[1].

Measure the time when you start something, measure the time when you finish, and print it. Anything that takes too long gets a closer look.

[1] unaffiliated with the printf school of debugging, but coincidentally located at the same campus.