samsara

a reference-counting cycle collection library in rust (by chc4)

Samsara Alternatives

Similar projects and alternatives to samsara

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better samsara alternative or higher similarity.

samsara discussion

Log in or Post with

samsara reviews and mentions

Posts with mentions or reviews of samsara. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-07-31.
  • Crafting Interpreters with Rust: On Garbage Collection
    12 projects | news.ycombinator.com | 31 Jul 2024
    There's also more recent implementations such as https://github.com/chc4/samsara (quite similar to https://github.com/pebal/sgcl , which is for C++. Both implement a concurrent tracing algorithm whoch allows for reduced latency compared to simple mark+sweep).
  • Tracing Garbage Collection for Arenas
    4 projects | news.ycombinator.com | 26 Jun 2024
    Interesting discussion. If you want to experiment with 'lightweight' traced GC in system programming, you might like https://github.com/chc4/samsara (for Rust) or https://github.com/pebal/sgcl (for C++) both implementing a concurrent tracing algorithm which is a bit more involved than what's directly discussed in OP.
  • Some notes on Rust, mutable aliasing and formal verification
    3 projects | news.ycombinator.com | 16 May 2024
    https://github.com/chc4/samsara is also worth looking into, implementing the same concurrent GC algorithm for Rust.
  • Garbage Collection for Systems Programmers
    7 projects | news.ycombinator.com | 30 Mar 2024
    > IME it's the other way around, per-object individual lifetimes is a rare special case

    It depends on your application domain. But in most cases where objects have "individual lifetimes" you can still use reference counting, which has lower latency and memory overhead than tracing GC and interacts well with manual memory management. Tracing GC can then be "plugged in" for very specific cases, preferably using a high performance concurrent implementation much like https://github.com/chc4/samsara (for Rust) or https://github.com/pebal/sgcl (for C++).

  • Why choose async/await over threads?
    11 projects | news.ycombinator.com | 25 Mar 2024
    > Just for example: "it needs a GC" could be the heart of such an argument

    Rust can actually support high-performance concurrent GC, see https://github.com/chc4/samsara for an experimental implementation. But unlike other languages it gives you the option of not using it.

  • Boehm Garbage Collector
    9 projects | news.ycombinator.com | 21 Jan 2024
    The compiler support you need is quite limited. Here's an implementation of cycle collection in Rust: https://github.com/chc4/samsara It's made possible because Rust can tell apart read-only and read-write references (except for interior mutable objects, but these are known to the compiler and references to them can be treated as read-write). This avoids a global stop-the-world for the entire program.

    Cascading deletes are rare in practice, and if anything they are inherent to deterministic deletion, which is often a desirable property. When they're possible, one can often use arena allocation to avoid the issue altogether, since arenas are managed as a single object.

  • Steel – An embedded scheme interpreter in Rust
    13 projects | news.ycombinator.com | 3 Dec 2023
    There are concurrent GC implementations for Rust, e.g. Samsara https://redvice.org/2023/samsara-garbage-collector/ https://github.com/chc4/samsara that avoid blocking, except to a minimal extent in rare cases of contention. That fits pretty well with the pattern of "doing a bit of GC every frame".
  • Removing Garbage Collection from the Rust Language (2013)
    9 projects | news.ycombinator.com | 11 Sep 2023
    There are a number of efforts along these lines, the most interesting is probably Samsara https://github.com/chc4/samsara https://redvice.org/2023/samsara-garbage-collector/ which implements a concurrent, thread-safe GC with no global "stop the world" phase.
  • I built a garbage collector for a language that doesn't need one
    3 projects | news.ycombinator.com | 14 Aug 2023
    Nice blog post! I also wrote a concurrent reference counted cycle collector in Rust (https://github.com/chc4/samsara) though never published it to crates.io. It's neat to see the different choices that people made implementing similar goals, and dumpster works pretty differently from how I did it. I hit the same problems wrt concurrent mutation of the graph when trying to count in-degree of nodes, or adding references during a collection - I didn't even think of doing generational references and just have a RwLock...
  • A note from our sponsor - SaaSHub
    www.saashub.com | 12 Oct 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic samsara repo stats
9
71
10.0
almost 2 years ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?