HNHacker News
TopNewBestAskShowJobs

pebal

23 karma · joined May 27, 2022

submissionscomments
pebal··on Go Optimization Guide
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 concurrent — as demonstrated by the SGCL project for C++.

In my opinion, the GC for Go is the most likely to become fully concurrent in the future.

pebal··on Go Optimization Guide
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 the negative performance impact of data relocation. Non-moving GCs are less invasive, which is why they don’t need generations and can be fully concurrent.

pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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 like root scanning, final marking, or safepoint synchronization. This is documented in OpenJDK sources, benchmarks, and even in Oracle’s own whitepapers. Claiming Java has truly pause-less GC is simply false.

Second, you’re suggesting there are moving GCs that don’t use read barriers and don’t stop mutator threads at all. That’s technically implausible. Moving collectors by definition relocate objects, and unless you stop the world or have some read barrier/hazard indirection, you can’t guarantee pointer correctness during concurrent access. You must synchronize with the mutator somehow — either via stop-the-world, read barriers, or epoch/hazard-based coordination. It’s not magic, it’s basic memory consistency.

SGCL works without moving anything. That’s why it doesn’t need synchronization, read barriers, or even slow-path allocation stalls. That’s not a limitation — that’s a design goal. You can dislike the model, but let’s keep the facts straight.

pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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?
pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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 the GC. Pointer access is completely normal — unlike in other languages that rely on mechanisms like read barriers.

Poluzuj gumkę, serio.

pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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 known for their cache efficiency. It's worth noting that Go deliberately avoids compaction, which suggests there's a trade-off at play.
pebal··on Go Optimization Guide
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't require.
pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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.
pebal··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
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 even Java, offers such a collector.
pebal··on Go Optimization Guide
If you have a moving, generational GC, then all the benefits of fast allocation are lost due to data moving and costly memory barriers.
pebal··on Let's Take a Look at JEP 483: Ahead-of-Time Class Loading and Linking
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.
pebal··on Let's Take a Look at JEP 483: Ahead-of-Time Class Loading and Linking
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.
pebal··on Let's Take a Look at JEP 483: Ahead-of-Time Class Loading and Linking
Please don't write pauseless if there are short pauses. Pauseless in the Java GC context is a marketing scam.
pebal··on Blasting Past WebP - An analysis of the NSO BLASTPASS iMessage exploit
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.

pebal··on Blasting Past WebP - An analysis of the NSO BLASTPASS iMessage exploit
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.
pebal··on Implementing Generic Types in C
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.
pebal··on A 10x Faster TypeScript
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 likely an attempt to justify the fact that their products aren't exceptionally performant either. Just take a look at the TIOBE rankings, and you'll see how many programmers hold a different view than you.
pebal··on A 10x Faster TypeScript
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 developers. Over-simplifying code will ultimately lead to programmers using such solutions being replaced by AI, while the software itself will demand enormous computational power. That’s not the way forward.
pebal··on A 10x Faster TypeScript
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 in C# and Java.
pebal··on A 10x Faster TypeScript
You can also have GC in C++ and generate even faster code.
pebal··on A 10x Faster TypeScript
I don't think there is anything faster.
pebal··on A 10x Faster TypeScript
Just use the fast GC library in C++.
pebal··on Ask HN: What less-popular systems programming language are you using?
Optional, Concurrent, Pause-Free GC for C++: https://github.com/pebal/sgcl
pebal··on Ultra-low-latency, batching and concurrent queue for IPC in Java
One millisecond is not a short pause.
pebal··on Ultra-low-latency, batching and concurrent queue for IPC in Java
Java doesn't have real pause-less GC.
pebal··on How Discord stores trillions of messages (2023)
This is not pauseless GC.
pebal··on Swift 6
ARC is a variation of GC. Besides, a tracing GC doesn't have to stop the world at all.
pebal··on FreeBSD considers Rust in the base system
Java will never have a completely pauseless GC. Because Java generates a lot of garbage and because Java's GC moves objects. It's funny that you think the best solutions have already been invented.
pebal··on FreeBSD considers Rust in the base system
> Does your C++ have a garbage collector? No?

You can have GC in C++, completely pauseless GC (https://github.com/pebal/sgcl). The only one in the world, even Java doesn't have anything like it. The GC support in the C++ standard was useless, so it was removed.

pebal··on MiniJinja: Learnings from Building a Template Engine in Rust
You can have completely pauseless GC tracking, also in Rust.
← PreviousPage 2 of 4Next →