want to know precise GC benchmarks

Rainer Schuetze r.sagitario at gmx.de
Wed Oct 2 06:41:28 UTC 2019



On 01/10/2019 18:24, a11e99z wrote:
> On Tuesday, 1 October 2019 at 16:12:18 UTC, a11e99z wrote:
>> does anybody some kind of benchmark to test conservative and precise GC?
>> precise GC is better or not? is STW improving?

Without false pointers the precise GC is usually a bit slower (by a few
%) due to additional work being done during allocations. But it can be a
lot faster if there are false pointers that pin large amounts of memory
still needed to be scanned during collections. False pointers are more
likely for 32-bit processes, but can also happen with 64-bit processes
(also depending on addresses used by OS allocations: OSX worse than
Windows worse than Linux).

> 
> and another question about GC and app parameters:
>> program.exe “–DRT-gcopt=gc:precise parallel:4”
>> “–DRT-scanDataSeg=precise” <input.data >output.data
> are this 2 -DRT params combined or overwriting each other?
> link to doc for DRT+GC https://dlang.org/spec/garbage.html#gc_config

These options are independent and can be used in arbitrary order. The
last option wins if you actually overwrite an option, e.g.
'“–DRT-gcopt=gc:precise parallel:4” “–DRT-gcopt=parallel:7”' will still
use the precise GC, but 7 mark threads.

Please note that “–DRT-scanDataSeg=precise” is only supported on Windows.

> 
> I know about rt_options[] but asking about program args
> 
> why I want to know such info?
> CodinGame sometimes use time-limit for bot move for example 100ms, and
> bot will be disqualified in case no answer

There is no actual upper limit for the collection time, it mostly
depends on how much life memory has to be scanned.


More information about the Digitalmars-d-learn mailing list