HackerTrans
トップ新着トレンドコメント過去質問紹介求人

pebal

no profile record

コメント

pebal
·8 か月前·議論
RC is a GC method and the least efficient one.
pebal
·9 か月前·議論
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 か月前·議論
This isn't fully concurrent GC. It pauses mutators threads and delegates them to perform some of the work for the GC.
pebal
·12 か月前·議論
> 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
·昨年·議論
But that's why Swift generates slower code. Memory is cheap, also for Apple, although Apple would like to hide that fact.
pebal
·昨年·議論
It doesn't matter at all. C4 uses STW.
pebal
·昨年·議論
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
·昨年·議論
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
·昨年·議論
There are none, at least not production grade.
pebal
·昨年·議論
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
·昨年·議論
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
·昨年·議論
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
·昨年·議論
You can also have GC in C++ and generate even faster code.
pebal
·昨年·議論
I don't think there is anything faster.
pebal
·昨年·議論
Just use the fast GC library in C++.
pebal
·2 年前·議論
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.