HackerTrans
TopNewTrendsCommentsPastAskShowJobs

pebal

no profile record

comments

pebal
·8 bulan yang lalu·discuss
RC is a GC method and the least efficient one.
pebal
·9 bulan yang lalu·discuss
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.
pebal
·12 bulan yang lalu·discuss
This isn't fully concurrent GC. It pauses mutators threads and delegates them to perform some of the work for the GC.
pebal
·12 bulan yang lalu·discuss
> 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? Gamedevs particulary have been writing custom memory allocators since decades precisely because they know free() is not free and malloc() isn't fast.

Game developers use engines based on the GC.

> It's not an illusion, you literally use control over memory management.

The shared_ptr does not provide full control.

> What they don't want is random stalls in odd frames.

You can have fully concurrent GC, without any stalls.
pebal
·tahun lalu·discuss
It doesn't matter at all. C4 uses STW.
pebal
·tahun lalu·discuss
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."
pebal
·tahun lalu·discuss
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.
pebal
·tahun lalu·discuss
There are none, at least not production grade.
pebal
·tahun lalu·discuss
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
·tahun lalu·discuss
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
·tahun lalu·discuss
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
·tahun lalu·discuss
You can also have GC in C++ and generate even faster code.
pebal
·tahun lalu·discuss
I don't think there is anything faster.
pebal
·tahun lalu·discuss
Just use the fast GC library in C++.
pebal
·2 tahun yang lalu·discuss
You can look at the SGCL garbage collector for C++: https://github.com/pebal/sgcl. It works in a separate thread, is locks-free and never stops the world.