Hacker News new | ask | show | jobs
by bitwize 1339 days ago
We have Rust now, and some safe memory usage patterns for C++. GC just increases your energy bill and helps heat up the planet.
3 comments

> GC just increases your energy bill

How? GC does its work in large batches once in a while, whereas for example Arc (the only serious alternative to what GC brings, which is the ability to have arbitrary graphs of objects) does its work much more frequently, with additional effort expended on atomic operations in a multithreaded environment, and with additional memory writes to boot. Somehow I doubt that GC "just increases your energy bill".

[Citation needed] Rust encourages reference counting, a particularly inefficient form of GC which actually turns reads into writes(!), and it cannot move objects to compact memory except when it can prove that every object has only a single reference.
>We have Rust now, and some safe memory usage patterns for C++.

>GC just increases your energy bill and helps heat up the planet.

Were C++ compilation times that use 100% of my PC taken into consideration?

And not just for final binary, but also the compilations that happen everyday for development purpose too