3 ms·
> The economics are in favor of writing substandard software and relying on hardware grunt to make up for it. I don't get this. Hardware can't make up for dark
by feoren 4y ago
> The economics are in favor of writing substandard software and relying on hardware grunt to make up for it.
I don't get this. Hardware can't make up for dark patters, awful UI, missing features, bloatware, vaporware, and adware. The only thing hardware can make up for is slowness, but even that is highly questionable: a big hardware upgrade could make a difference of 50%, but improving the algorithm or eliminating a SELECT N can make a difference of multiple orders of magnitude.
- BuzzwordChief 4y ago> improving the algorithm or eliminating a SELECT N can make a difference of multiple orders of magnitude Yes and no. The main source of slowness in modern software is memory access (patterns). Yes, a binary search is just O(log(n)) but if your array isn't to big a linear search will probably be faster, just because the chance of your data being in cache is much higher due to prefetching. But it's much harder to plan, program or to refactor software to have a cache friendly memory layout and access pattern. And good luck optimizing your Java, Python, etc. code with respect to memory when even integers are pointers to some data on the heap...
- Zababa 4y ago> The main source of slowness in modern software is memory access I don't think it is. Memory access patterns matters a lot when you want to squeeze every last bit of performance, or when you want to update old code that was optimized for different assumptions. But I think most slowness comes from not having looked at what could make your software slow. Maybe you forgot to compile a regex before a loop, maybe you're copying a whole array at each of the 100 000 iterations, maybe your algorithm is accidentally n^2.
- feoren 4y ago> Yes, a binary search is just O(log(n)) but if your array isn't to big a linear search will probably be faster If your array isn't too big, it's not the bottleneck. You're talking about tippy-top-tier optimizations to eke out the last 10% possible improvement. I'm talking about the extreme prevalence of bad, lazy, thoughtless programming needlessly slowing down most systems by 100x or more. Maybe you work in embedded systems and drop into assembly to manually optimize a hot loop, but most of us don't. Most applications in the world send thousands of SQL queries to a database to do a job that should require only three.
- JohnFen 4y ago> Hardware can't make up for dark patters, awful UI, missing features, bloatware, vaporware, and adware. Excepting for dark patterns, vaporware, and adware -- all of which I consider "malware" -- the rest is, I think, due to the use and abuse of frameworks and libraries whose entire goal is to reduce the amount of developer's time required. So they count as cost-savings, and result in poorer quality software. Hardware doesn't make up for them, but hardware makes their use more practical. The additional memory usage, disk usage, and reduction in performance are easier to overlook because the hardware can absorb the blows.