r/rust • u/TheProgrammar89 • Jul 26 '19
Is this comment about the reference counting performance in Rust accurate?
/r/ProgrammerHumor/comments/b274zp/oof/eirvecs?context=3
50
Upvotes
r/rust • u/TheProgrammar89 • Jul 26 '19
View all comments
Show parent comment
39
u/matthieum [he/him] Jul 26 '19
Finally! I was already sharpening my pens to explain the issue of pervasiveness myself.
It does not matter of reference-counting is 2x as slow as a garbage collector for a given number of objects, when eschewing the garbage collector allows an implementation to only use reference-counting for 1/10th or 1/50th of the objects that said garbage collector would: the reference-counting implementations still ends up being 5x or 25x as fast, respectively.
There are other benefits to reference-counting: determinism and O(1) run-time alias querying for example.