<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Rust provides both Atomic Reference Counting (called Arc) and non-atomic Reference Counting (called Rc). You choose the one that makes sense. Hopefully the type system complains if you use Rc in a context where atomicity is required, but I don't use Rust. C++ provides only atomic refcounting in the standard library; for the other kind you roll your own (which I have done).<br></div><div><br></div><div>On Sat, Dec 12, 2020, at 6:31 PM, Mikalai Birukou via kwlug-disc wrote:<br></div><blockquote type="cite" id="qt" style=""><p><moving into discussing silicon and near it><br></p><blockquote type="cite" cite="mid:68fc4396-f21b-4d19-a483-5530e771df30@www.fastmail.com"><div>Another trick is that Apple's dev languages and frameworks
(Swift and Objective-C) use reference counting, which requires
atomic increments and decrements. On Intel, these operations are
five times slower than non-atomic operations; on Apple Silicon
they run at the same speed. This is something I wish the other
CPU vendors would get right, because refcounting has some
technical advantages over tracing GC, and I use it in software I
write. C++ and Rust, both "performance" languages, provide
refcounting but not tracing GC.<br></div><blockquote type="cite" id="qt-qt" style=""><div>Regarding M1. My
Understanding is that placement of RAM inside of processor
package/silicon is the trick that makes it run fast. Is there
anything else?<br></div><div> <br></div><blockquote type="cite" cite="mid:CAG+C2Ac8=RBOKgE8d-TAZrFJnxKe8vJQSLOF_pO_7P7_yGHurA@mail.gmail.com"><div dir="ltr"> The Apple M1 looks decent, but since Apple no
longer lets you run Linux on their hardware, I have no
desire to ever buy one.<br></div></blockquote></blockquote></blockquote><div>Does Rust standard refcounting, or implementation of such pointers
need to use atomic in/decrements? Can't it use non-atomic something,
given a more detailed knowledge of ownership? Just wondering.<br></div><div> <br></div><div>_______________________________________________<br></div><div>kwlug-disc mailing list<br></div><div><a href="mailto:kwlug-disc@kwlug.org">kwlug-disc@kwlug.org</a><br></div><div><a href="https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org">https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br></div><div><br></div></blockquote><div><br></div></body></html>