Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by Zababa on Friday September 17, 2021 @07:20AM
(#28564042)
I think it's mostly targeted at C or C++ users. Swift is garbage collected.
[ Parent
| on HN ]
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by zozbot234 on Friday September 17, 2021 @08:19AM
(#28564561)
Swift uses ARC (atomic reference counting) which differs from tracing GC. C++ and Rust have similar features but can avoid the overhead of ARC in many cases.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by Zababa on Friday September 17, 2021 @10:54AM
(#28566162)
I know ARC is different from tracing GC, I just don't like how some people try to sell Swift as not garbage collected when it is. Python mainly uses RC, and no one would image calling Python not garbage collected. Calling Swift not garbage collected is a marketing trick, saying they make different tradeoffs compared to tracing GCs is true.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by FpUser on Friday September 17, 2021 @08:50AM
(#28564835)
I have big and complex server in C++. Not a single explicit memory related call in it. STL does wonders in this department.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by sgt on Friday September 17, 2021 @08:18AM
(#28564554)
Incorrect, Swift is not garbage collected. It uses reference counting. Read more here: https://docs.swift.org/swift-book/LanguageGuide/AutomaticRef...
As for C and C++, yes, of course. I meant "everyone else" as in the trendy new languages.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by saagarjha on Friday September 17, 2021 @08:27AM
(#28564644)
Reference counting is technically a form of garbage collection, FYI.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by sgt on Friday September 17, 2021 @10:20AM
(#28565806)
Reference counting deals with operations that have constant time, which I think puts it in a different category than what people normally view as GC.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by kaba0 on Friday September 17, 2021 @01:38PM
(#28568421)
And has a different tradeoff, due to atomic operations being needed for objects shared between threads (and of course, circular references).
But no matter what, it is literally a GC algorithm, described in every book about GCs.