this post was submitted on 16 Sep 2025
263 points (96.8% liked)

Programmer Humor

27215 readers
460 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] davidagain@lemmy.world 5 points 1 month ago* (last edited 1 month ago) (33 children)

Reference counting.

They pay a lot of attention to preventing cache misses and branch prediction failures, which is how they get away with reference counting and still being fast.

[–] CanadaPlus@lemmy.sdf.org 10 points 1 month ago (28 children)

Oh, you just mean it's a kind of garbage collection that's lighter on pauses. Sorry, I've had the "my pre-Rust pet language already does what Rust does" conversation on here too many times.

[–] firelizzard@programming.dev 1 points 1 month ago (8 children)

Garbage collection is analyzing the heap and figuring out what can be collected. Reference counting requires the code to increment or decrement a counter and frees memory when the counter hits zero. They’re fundamentally different approaches. Also reference counting isn’t necessarily automatic, Objective-C had manual reference counting since day one.

[–] BatmanAoD@programming.dev 4 points 1 month ago

"Garbage collection" is ambiguous, actually; reference counting is traditionally considered a kind of "garbage collection". The type you're thinking of is called "tracing garbage collection," but the term "garbage collection" is often used to specifically mean "tracing garbage collection."

load more comments (7 replies)
load more comments (26 replies)
load more comments (30 replies)