News for hackers. Stuff that matters.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by pyeri on Sunday January 21, 2024 @07:54AM (#39078016)
You don't need to go that far for GC's bad rep considering that excruciatingly slow Python can be found TODAY!
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by torginus on Sunday January 21, 2024 @08:13AM (#39078153)
Afaik (C)Python uses reference counting, it's slowness comes from the interpreter itself.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by _flux on Sunday January 21, 2024 @08:21AM (#39078192)
It uses also tracing GC to handle RC loops.

I guess doing it this way allows to have mostly deterministic collection (that is then just an implementation feature, not language semantics) while needing the actual tracing GC to not be that efficient, as it presumably needs to be executed less rarely.

Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by kaba0 on Sunday January 21, 2024 @10:52AM (#39079514)
Ref counting is a GC-algorithm, and the slowest at that (especially with multi-core sync, but that’s not the case with python), as a tradeoff for less memory consumption.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by DarkNova6 on Sunday January 21, 2024 @08:06AM (#39078099)
But you must understand, Python is safe and C is difficult. Therefore, to be fast we need Python (fast development that is because nobody _really_ cares about performance (or maintainability)).

If only more than two languages would exist!

Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by h4ch1 on Sunday January 21, 2024 @10:44AM (#39079436)
> fast development that is because nobody _really_ cares about performance (or maintainability)

This is either

1. missing a /s

2. delusion

3. bait

Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by tmtvl on Sunday January 21, 2024 @11:22AM (#39079850)
I believe it's 1, considering the statement 'If only more than two languages would exist!'. Granted, sarcasm doesn't transmit well in written text.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by amelius on Sunday January 21, 2024 @08:09AM (#39078125)
Python wasn't designed for speed.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by adev_ on Sunday January 21, 2024 @08:31AM (#39078266)
> You don't need to go that far for GC's bad rep considering that excruciatingly slow Python can be found TODAY!

To be fair, the GC is probably the last reason of Python speed problems.

Many languages also designed with GC performs significantly better than python in term of raw performance [^1].

The extremely dynamic nature of python associated with its reference semantics are probably significantly more to blame here.

[^1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...