Hacker News new | ask | show | jobs
by sacado2 2087 days ago
> Then how come everything is so ridiculously slow these days, despite faster computers?

As you said, it's usually not a GC issue. Many of these ridiculously slow programs you talk about are written in C++.

1 comments

VSCode, Slack, Intellij Idea, some random JS on a website - indeed all C++ programs. I'm not arguing against GC, but more about the philosophy of saying that only 2% programs need a good level of performance. It starts from using GC instead of thinking about object ownerships (which btw often also results in harder to read, more convoluted code) and ends up launching an embedded web-browser to display a few images and a bunch of text and taking 1 GB of RAM. But it is not developer's RAM, so who cares?

Summarising - using a GCed language instead of dropping a few occasional clone calls in the code is bad advice, unless the program is really a one-off fire and forget thing (but these are not 98% of software).

The soft I have the most performance issues are Firefox, LibreOffice and Aperçu (don't know its original name, but it's called that way in French -- Apple's PDF viewer). All of them written in different, non-GCed languages. Usuall the problem is abuse of abstraction layers, more than abuse of a GC. And your javascript examples are a good example of that. GCed languages tend to abuse dynamic allocation and dynamic dispatch, even when it's not needed (there is more garbage to deal with).

However I agree the idea only a few software need to run fast is bullcrap.