by jimbob45 · 1w ago · 0 comments
In Comparison, traditional GCs like JVM runs on a background thread, it's hard to determine when they run and generally blocks the whole program while collecting (stop-the-world).
So at least they are a little better in that regard?
Javas modern GCs also have extremely low pauses. ZGC is effectively pauseless, you’re likely to experience kernel jitter/traps that last longer than a ZGC pause.
type
RefObj = ref object
foo: string
bar: int
ValueObj = object
foo: string
bar: int
`RefObj` is ref counted equivalent to a shared_ptr in C++ land (non-atomic counter unless using --mm:atomicArc or Nim3/Nimony has this as a default I believe). `ValueObj` is equivalent to struct in C, C++, etc.