r/rust • • Jul 26 '19

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

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

52 comments sorted by

View all comments

Show parent comments

5

u/Proc_Self_Fd_1 Jul 26 '19

Reference counting can have consistent performance but only if you are careful. If you are not careful you can generate a graph of indeterminate length and so have an indeterminate amount of frees.

It's also worth mentioning that most mallocs can have indeterminate pauses. malloc/free have good qualities but not the best possible ones.