r/rust • • Jul 26 '19

Is this comment about the reference counting performance in Rust accurate?

/r/ProgrammerHumor/comments/b274zp/oof/eirvecs?context=3
52 Upvotes

52 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jul 26 '19

[deleted] — view deleted comment

60

u/birkenfeld clippy · rust Jul 26 '19

Yes, what people seem to be missing is that in languages that use refcounting exclusively, refcounts are typically increased and decreased everywhere that the objects are shared. In Rust, to pass a refcounted object around locally you just use & borrows and typically only have to Rc::clone() at few strategic points.