HNHacker News
TopNewBestAskShowJobs

pebal

23 karma · joined May 27, 2022

submissionscomments
pebal··on Mimalloc Cigarette: Losing one week of my life catching a memory leak (Rust)
They are not. All Java GC introduce pauses, only short ones. SGCL for C++ is a true pauseless GC.
pebal··on Godotcaml for Godot 4.2
GC doesn't have to stop the world. There are fully concurrent GC engines.
pebal··on Introduction to the Odin Programming Language
You can have a pause-free GC, where the collector runs in a separate thread and never pauses the mutator threads.
pebal··on Borrow Checking, RC, GC, and the Eleven () Other Memory Safety Approaches
RC is and will be slower than GC. Even in C++ I can have pointers managed by GC that are faster than shared_ptr.
pebal··on Google Common Lisp Style Guide
> 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 space and time constraints.

ARC is slower than good GC.

pebal··on Garbage collection for systems programmers (2023)
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 and more efficiently.

pebal··on Garbage collection for systems programmers (2023)
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 collection systems, I'm interested in code performance. Are you aware of any other absolutely zero pause GCs?

pebal··on Garbage collection for systems programmers (2023)
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: https://github.com/pebal/sgcl/blob/main/examples/treap/treap...

Only D language is close to the result, the rest of the GC languages are several times slower.

(clang on Windows)

raw pointers: 149ms

tracked pointers: 181ms

pebal··on Garbage collection for systems programmers (2023)
You don't have to choose in C++ because you can have optional tracked pointers managed by the pause-free GC engine.
pebal··on Garbage collection for systems programmers (2023)
The article doesn't say anything about acceptable pause times. GC can be completely pause-free.
pebal··on Garbage collection for systems programmers (2023)
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's possible to leverage GC in a manner similar to how `shared_ptr` is used, providing both automated cleanup and precise control over object lifetime. For a practical example, consider SGCL: https://github.com/pebal/sgcl
pebal··on Rust data structures with circular references (2021)
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.
pebal··on Rust data structures with circular references (2021)
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.
pebal··on Rust data structures with circular references (2021)
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.
pebal··on Rust data structures with circular references (2021)
You can have completely concurrent GC, without pausing threads.

https://github.com/pebal/sgcl

pebal··on Rust data structures with circular references (2021)
You can have completely concurrent GC, without pausing threads.

https://github.com/pebal/sgcl

pebal··on Boehm-Demers-Weiser conservative C/C++ Garbage Collector
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.
pebal··on D Programming Language
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.
pebal··on D Programming Language
There is only one like that, SGCL for C++ https://github.com/pebal/sgcl
pebal··on The missing C++ smart pointer
It will never be called gc_ptr because C++ programmers have an allergy to the term GC. However, an attempt was made to implement a similar solution. Take a look at tracked_ptr: https://github.com/pebal/sgcl
pebal··on In Rust, for memory, you don't pay as you go, everyone has to pay all the time
You can have completely pauseless GC. Take a look at SGCL for C++.
pebal··on Successful Lisp: How to Understand and Use Common Lisp (1999)
The Mark and Sweep algorithm with tri-color marking variation was used. There is no documentation yet, but I am happy to answer your questions (snibisz@gmail.com).
pebal··on Successful Lisp: How to Understand and Use Common Lisp (1999)
Look at this real-time garbage collector for C++: https://github.com/pebal/sgcl
pebal··on The Garbage Collection Handbook, 2nd Edition
You may have absolutely zero pauses if you don't have heap compaction.
pebal··on Retiring a favourite C++ joke
You may be surprised. Herb Sutter wants to add optional GC to C++ 'syntax 2'.
pebal··on Retiring a favourite C++ joke
C++ does not have garbage collection in the standard library, just as shared_ptr was not part of the standard library in the past. You can currently have optional garbage collection in C++: https://github.com/pebal/sgcl
pebal··on Boehm-Demers-Weiser Garbage Collector
Only compacting GCs need to pause application. It is possible to implement GC without pauses.
pebal··on Boehm-Demers-Weiser Garbage Collector
SGCL is a real-time garbage collector for C++ without any pauses.

https://github.com/pebal/sgcl

pebal··on Will Carbon Replace C++?
You are absolutely right. GC can be an advantage and there is no need to be ashamed of it. Herb Sutter is working on "syntax 2" for the C++ language and wants to have GC smart pointers in C++. The D creators should work on improving the GC so that it does not force pauses instead of explaining that GC does not have to be used.
pebal··on C++23 “Pandemic Edition” is complete
Show an example of a lock-free concurrent stack freeing nodes memory.
← PreviousPage 3 of 4Next →