Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 01, 2019 want to know precise GC benchmarks | ||||
---|---|---|---|---|
| ||||
does anybody some kind of benchmark to test conservative and precise GC? precise GC is better or not? is STW improving? |
October 01, 2019 Re: want to know precise GC benchmarks | ||||
---|---|---|---|---|
| ||||
Posted in reply to a11e99z | 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? 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 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 |
October 01, 2019 Re: want to know precise GC benchmarks | ||||
---|---|---|---|---|
| ||||
Posted in reply to a11e99z | On Tuesday, 1 October 2019 at 16:24:49 UTC, a11e99z wrote:
>
> 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
Simple solution: don't allocate every frame. The GC only runs when it needs to and it only needs to if an allocation request takes it over a certain threshold. If you need to allocate at all, do it up front. Or better, do it statically. Then the GC won't run at all.
What sort of CodinGame bot would you need to allocate from the GC for anyway?
|
October 02, 2019 Re: want to know precise GC benchmarks | ||||
---|---|---|---|---|
| ||||
Posted in reply to a11e99z | 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. |
October 02, 2019 Re: want to know precise GC benchmarks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | On Wednesday, 2 October 2019 at 06:41:28 UTC, Rainer Schuetze wrote:
>
thanks for the detailed answer
|
Copyright © 1999-2021 by the D Language Foundation