• 0 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: July 20th, 2023

help-circle
  • Esp@lemmy.blahaj.zonetoRust Lang@lemmyrs.orgAsync Rust Is A Bad Language
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    ARC can memory leak if you don’t properly use weak references when appropriate. You trade GC ticks for having to deal with a counter. generally GC will (raw language performance aside) have higher throughput (because its not spending time doing ref counts) but will have more sporadic latency because if the GC ticks, then your program is basically on pause until it’s done.

    Comparing them as if one is better than the other feels like painfully missing the point. Completely different memory models. And if you’re only slightly making use of ARC, then switching to a GC is a big jump.