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
49
Upvotes
r/rust • u/TheProgrammar89 • Jul 26 '19
View all comments
Show parent comment
4
u/simonask_ Jul 27 '19
It only incurs any overhead when you
clone()it a lot. I don't think that's actually all that common. In my experience, it tends to happen when you do some initial setup of a context for something like a thread, in which case you are already doing some fairly expensive things, like a system call.I would really not worry about
Arcoutside of cloning in a loop or something like that.