Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pebal
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
pebal
2y ago
You can also have GC in C++ and generate even faster code.
32.
▲
by
pebal
2y ago
I don't think there is anything faster.
33.
▲
by
pebal
2y ago
Just use the fast GC library in C++.
34.
▲
by
pebal
2y ago
Optional, Concurrent, Pause-Free GC for C++: https://github.com/pebal/sgcl
35.
▲
Optional, Pause-Free GC in C++: A Game-Changer for Cyclic Structures
(github.com)
2 points
by
pebal
2y ago
|
0 comments
36.
▲
by
pebal
2y ago
One millisecond is not a short pause.
37.
▲
by
pebal
2y ago
Java doesn't have real pause-less GC.
38.
▲
by
pebal
2y ago
This is not pauseless GC.
39.
▲
by
pebal
2y ago
ARC is a variation of GC. Besides, a tracing GC doesn't have to stop the world at all.
40.
▲
by
pebal
2y ago
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.
41.
▲
by
pebal
2y ago
> 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
42.
▲
by
pebal
2y ago
You can have completely pauseless GC tracking, also in Rust.
43.
▲
by
pebal
2y ago
They are not. All Java GC introduce pauses, only short ones. SGCL for C++ is a true pauseless GC.
44.
▲
by
pebal
2y ago
GC doesn't have to stop the world. There are fully concurrent GC engines.
45.
▲
by
pebal
2y ago
You can have a pause-free GC, where the collector runs in a separate thread and never pauses the mutator threads.
46.
▲
by
pebal
2y ago
RC is and will be slower than GC. Even in C++ I can have pointers managed by GC that are faster than shared_ptr.
47.
▲
by
pebal
2y ago
> You will incur a performance and memory consumption penalty using a GC'd language, an in this day and age with RAII and ARC, those are penalties you need not incur in order to safely, conveniently use memory within deterministic s
48.
▲
by
pebal
3y ago
Java generates a lot of garbage because its designers thought that the stack is unnecessary and GC is enough for everything. They were wrong. Both ZGC and Azul C4 pause threads. SGCL never pause threads, so it can collect garbage more often
49.
▲
by
pebal
3y ago
Java needs to generates a lot of garbage, whereas C++ does not. Therefore, GC for C++ can be simpler and generate lower overhead than GC for Java. I'm not interested in the amount of money companies invest in developing garbage collect
50.
▲
by
pebal
3y ago
Not true. Visit the repositorium and see the benchmark results: https://github.com/frol/completely-unscientific-benchmarks The SGCL repository contains the source code for this benchmark that uses the tracked pointers:
51.
▲
by
pebal
3y ago
You don't have to choose in C++ because you can have optional tracked pointers managed by the pause-free GC engine.
52.
▲
by
pebal
3y ago
The article doesn't say anything about acceptable pause times. GC can be completely pause-free.
53.
▲
by
pebal
3y ago
Having garbage collection (GC) in your toolkit doesn't mean you're limited to choosing between GC and deterministic destruction. You can integrate GC, stack allocation, and manual memory management within the same application. It&
54.
▲
by
pebal
3y ago
I misunderstood you. State is shared by mutator threads using atomic::store(memory_order_release). SGCL never stops threads and does not use locks to share state.
55.
▲
by
pebal
3y ago
You either pause the worker threads or share the state, there's no other way. However, the GC thread does not modify the data state.
56.
▲
by
pebal
3y ago
This GC operates with zero pause time. The GC runs on a separate thread, so can reduce memory bandwidth if the GC experiences heavy load.
57.
▲
by
pebal
3y ago
You can have completely concurrent GC, without pausing threads. https://github.com/pebal/sgcl
58.
▲
by
pebal
3y ago
You can have completely concurrent GC, without pausing threads. https://github.com/pebal/sgcl
59.
▲
by
pebal
3y ago
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.
60.
▲
by
pebal
3y ago
The garbage collector must lock threads if it is compacting or does not create separate stacks for pointers only. All GCs for Java a lock application threads.
More ›