Re:Why modern software is slow
by jeffmcmahan on Thursday September 29, 2022 @10:51PM
(#33030311)
Why is modern software slow? Because Joe developer's solution to a given problem is to Google up a package that solves the problem, check the license, and then run:
Developer Andy, author of { randomPkg }, does the same thing. And so on, ad infinitum. You want to sum two numbers?
And the source code will be:
[ Parent
| on HN ]
Re:Why modern software is slow
by ChadNauseam on Friday September 30, 2022 @12:57AM
(#33031162)
In many cases this is the opposite of true. GTA online had a bug in their home-rolled json parser that caused it to read files in O(n*2), which went unfixed for years and added minutes to the loading time. That bug is much less likely to exist in a popular open-source package, because there are more eyes to catch it and fix it.
Re:Why modern software is slow
by llanowarelves on Friday September 30, 2022 @03:24AM
(#33031975)
Yep. Game devs handroll lots and release back to public much less than other tech companies.
Not unheard of to even forego c++ stdlib and rolling their own structures.
In these cases it's not a matter of not understanding the low level internals.
Re:Why modern software is slow
by Dylan16807 on Thursday September 29, 2022 @10:57PM
(#33030348)
That kind of thing won't make a program significantly slower other than a second or two to load, and won't make compiled programs slower at all.
Re:Why modern software is slow
by jeffmcmahan on Thursday September 29, 2022 @11:14PM
(#33030457)
No no you're so right. Let's have 500 packages installed to do multiplication. Zero performance impact, I'm sure.
Re:Why modern software is slow
by Dylan16807 on Friday September 30, 2022 @01:08AM
(#33031223)
You seem sarcastic, but you're saying something very true. The number of packages installed should have basically zero impact on performance. What matters is how much code the program runs, and the only extra code you added was import statements. That won't do much in many situations, and in compiled code it will have zero performance impact. The compile will take longer but you're not even the one that has to compile it.
Dylan is correct. The impact of the packages will be disk space and perhaps startup time, but that's it. The add function gets inlined in basically any runtime environment or compiler, even at O0 most likely.
Re:Why modern software is slow
by userbinator on Thursday September 29, 2022 @11:54PM
(#33030710)
It all adds up.
You can sum as many zeroes as you want, the result is still zero.
This is necessary in JS because the language itself is broken. You actually can't JUST add 2 "number"s because they might not actually be numbers. Writing raw JS is like writing raw assembly.
Re:Why modern software is slow
by jeffmcmahan on Friday September 30, 2022 @09:19AM
(#33034483)
Forgive me for having chosen pseudo js for the example - and npm. That conflates the issue. I meant to convey an attitude - let some random package do the work, who cares whether it is deep and complex and handling cases I won't ever need, offering API surface that will go unused, and perhaps doing simple things inefficiently. The language doesn't much matter if "ship ship ship rn" is the ethic that drives decision making.