Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pebal
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
pebal
10mo ago
RC is a GC method and the least efficient one.
2.
▲
by
pebal
11mo ago
The C++ standard has never included a garbage collector. It only provided mechanisms intended to facilitate the implementation of a GC, but they were useless.
3.
▲
by
pebal
1y ago
This isn't fully concurrent GC. It pauses mutators threads and delegates them to perform some of the work for the GC.
4.
▲
by
pebal
1y ago
> I haven't seen a C++ programmer carefully opt into GC for a subset of their allocations even though there are GC libraries written for the language. Can you give an example of such GC libraries? > Whoever made that claim? Gamed
5.
▲
by
pebal
1y ago
But that's why Swift generates slower code. Memory is cheap, also for Apple, although Apple would like to hide that fact.
6.
▲
by
pebal
1y ago
It doesn't matter at all. C4 uses STW.
7.
▲
by
pebal
1y ago
Azul C4 is not a pauseless GC. In the documentation it says "C4 uses a 4-stage concurrent execution mechanism that eliminates almost all stop-the-world pauses."
8.
▲
by
pebal
1y ago
There are no production implementations of GC algorithms that don't stop the world at all. I know this because I have some expertise in GC algorithms.
9.
▲
by
pebal
1y ago
There are none, at least not production grade.
10.
▲
by
pebal
1y ago
Yes, SGCL is my project. You can't write concurrent code without atomic operations — you need them to ensure memory consistency, and concurrent GCs for Java also rely on them. However, atomic loads and stores are cheap, especially on x
11.
▲
by
pebal
1y ago
Java currently has no fully concurrent GC, and due to the volume of garbage it manages and the fact that it moves objects, a truly fully concurrent GC for this language is unlikely to ever exist. Non-moving GCs, however, can be fully concur
12.
▲
by
pebal
1y ago
That time may seem negligible, since the OS can context switch threads anyway, but it’s still additional time during which your code isn’t doing its actual work. Generations are used almost exclusively in moving GCs — precisely to reduce th
13.
▲
by
pebal
1y ago
First, there are no Java GCs that completely eliminate stop-the-world pauses. ZGC and Shenandoah reduce them to very short, sub-millisecond windows — but they still exist. Even the most concurrent collectors require STW phases for things li
14.
▲
by
pebal
1y ago
As I mentioned earlier, take a look at the Golang. It's newer than Java, yet it uses a non-moving GC. Are you assuming its creators are intentionally making slower this language?
15.
▲
by
pebal
1y ago
There isn’t a single truly pause-less GC for Java — and I’ve already proven that to you before. If such a GC exists for any other language, name it. And no, SGCL doesn’t introduce slow paths, because mutators never have to synchronize with
16.
▲
by
pebal
1y ago
Compaction doesn't necessarily guarantee cache friendliness. While it does ensure contiguity, object layout can still be arbitrary. True cache performance often depends on the locality of similar objects — for example, memory pools are
17.
▲
by
pebal
1y ago
It doesn't matter if objects die young — the other objects on the heap are still moved around periodically, which reduces performance. When you're using a moving GC, you also have additional read barriers that non-moving GCs don&#
18.
▲
by
pebal
1y ago
SGCL introduces the `tracked_ptr` smart pointer, which is used similarly to `shared_ptr`. The collector doesn't move data, which makes it highly efficient and — perhaps surprisingly — more cache-friendly than moving GCs.
19.
▲
by
pebal
1y ago
C++ isn't hostile toward garbage collection — it's more the programmers using C++ who are . C++ is the only language that can have an optional, totally pause-less, concurrent GC engine (SGCL). No other programming language, not ev
20.
▲
by
pebal
1y ago
If you have a moving, generational GC, then all the benefits of fast allocation are lost due to data moving and costly memory barriers.
21.
▲
by
pebal
1y ago
You can't call GC pauseless if it introduces pauses. We don't say something is free if you have to pay little for it. We say it's cheap.
22.
▲
by
pebal
1y ago
This is some weird way of counting. A system pause plus a GC pause is two pauses. Just because one pause can't be avoided doesn't mean you can introduce more pauses.
23.
▲
by
pebal
1y ago
Please don't write pauseless if there are short pauses. Pauseless in the Java GC context is a marketing scam.
24.
▲
by
pebal
1y ago
Here you have a GC engine that is completely pauseless: https://github.com/pebal/sgcl It is available as a C++ library, so you can easily compare its performance to the reference counting.
25.
▲
by
pebal
1y ago
The reference counting also causes pauses when freeing large object graphs. Fully concurrent GC does not cause any pauses and it's more efficient. It also has less memory overhead per object.
26.
▲
by
pebal
1y ago
The creators of the D made a big mistake. Instead of focusing on improving the GC, they focused on making it possible to avoid GC in D. The Go has shown that this strategy was wrong.
27.
▲
by
pebal
2y ago
I assume that the original performance profile of these tools was satisfactory to their creators, yet they still decided to rewrite them. I admire programmers who claim that their tools don't need to be maximally optimized. This is lik
28.
▲
by
pebal
2y ago
Where performance is paramount, developer convenience takes a backseat. Moreover, C++ has evolved significantly in recent years and is now quite enjoyable to use. We’re also discussing a tool in this thread whose performance is critical for
29.
▲
by
pebal
2y ago
Doubt is human, but it isn’t always warranted. In C++ can use a concurrent, completely pause‐free garbage collector, where the programmer decides which data is managed by the GC. This enables code optimizations in ways that aren’t possible
30.
▲
by
pebal
2y ago
You can also have GC in C++ and generate even faster code.
More ›