Re: want to know precise GC benchmarks

2019-10-02 Thread a11e99z via Digitalmars-d-learn
On Wednesday, 2 October 2019 at 06:41:28 UTC, Rainer Schuetze wrote: thanks for the detailed answer

Re: want to know precise GC benchmarks

2019-10-02 Thread Rainer Schuetze via Digitalmars-d-learn
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 s

Re: want to know precise GC benchmarks

2019-10-01 Thread Mike Parker via Digitalmars-d-learn
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

Re: want to know precise GC benchmarks

2019-10-01 Thread a11e99z via Digitalmars-d-learn
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

want to know precise GC benchmarks

2019-10-01 Thread a11e99z via Digitalmars-d-learn
does anybody some kind of benchmark to test conservative and precise GC? precise GC is better or not? is STW improving?

Re: Using D's precise GC when running an app with DUB

2019-05-24 Thread Per Nordlöw via Digitalmars-d-learn
On Thursday, 23 May 2019 at 15:25:31 UTC, Per Nordlöw wrote: You mean wise versa, right? Nevermind that comment. No "wise versa". You're answer is correct, rikki cattermole. Thanks

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread Eugene Wissner via Digitalmars-d-learn
On Thursday, 23 May 2019 at 14:50:12 UTC, Per Nordlöw wrote: How do I specify a druntime flag such as --DRT-gcopt=gc:precise when running with dub as dub run --compiler=dmd --build=unittest ? The precise GC flag was introduced in verison 2.085.0 See: - https://dlang.org/changelog

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread Per Nordlöw via Digitalmars-d-learn
On Thursday, 23 May 2019 at 15:05:15 UTC, rikki cattermole wrote: Should be as easy as     dflags "--DRT-gcopt=gc:precise" right? That would be passed to dmd, not to the build executable upon running. You mean wise versa, right? Now I understand, --DRT-gcopt=gc:precise is passed to

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/05/2019 3:03 AM, Per Nordlöw wrote: On Thursday, 23 May 2019 at 15:02:12 UTC, rikki cattermole wrote: And if I want to set this in a dub.sdl? No can do. There is meant to be a way to set it in D however. But I have heard mixed results (not that I've tried it). Should be as easy as   

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/05/2019 2:58 AM, Per Nordlöw wrote: On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote: dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Thanks! And if I want to set this in a dub.sdl? No can do. There is meant to be a way to set it in D however. But I

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread Per Nordlöw via Digitalmars-d-learn
On Thursday, 23 May 2019 at 15:02:12 UTC, rikki cattermole wrote: And if I want to set this in a dub.sdl? No can do. There is meant to be a way to set it in D however. But I have heard mixed results (not that I've tried it). Should be as easy as dflags "--DRT-gcopt=gc:precise" right?

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/05/2019 3:01 AM, Per Nordlöw wrote: On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote: dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Hmm, the flag doesn't propagate to dmd when compiling in verbose mode via -v as     dub run -v --compiler=dmd

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread Per Nordlöw via Digitalmars-d-learn
On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote: dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Hmm, the flag doesn't propagate to dmd when compiling in verbose mode via -v as dub run -v --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread Per Nordlöw via Digitalmars-d-learn
On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote: dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Thanks! And if I want to set this in a dub.sdl?

Using D's precise GC when running an app with DUB

2019-05-23 Thread Per Nordlöw via Digitalmars-d-learn
How do I specify a druntime flag such as --DRT-gcopt=gc:precise when running with dub as dub run --compiler=dmd --build=unittest ? The precise GC flag was introduced in verison 2.085.0 See: - https://dlang.org/changelog/2.085.0.html#gc_precise - https://dlang.org/spec/garbage.html

Re: Using D's precise GC when running an app with DUB

2019-05-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/05/2019 2:50 AM, Per Nordlöw wrote: How do I specify a druntime flag such as     --DRT-gcopt=gc:precise when running with dub as     dub run --compiler=dmd --build=unittest dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise

Re: precise GC

2019-03-05 Thread Rainer Schuetze via Digitalmars-d-learn
On 05/03/2019 22:30, H. S. Teoh wrote: > On Tue, Mar 05, 2019 at 09:50:34PM +0100, Rainer Schuetze via > Digitalmars-d-learn wrote: >> On 04/03/2019 12:12, KnightMare wrote: > [...] >>> 3) closures: do the closures have any internal types that helps to >>> GC or are they (full closure memory

Re: precise GC

2019-03-05 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 05, 2019 at 09:50:34PM +0100, Rainer Schuetze via Digitalmars-d-learn wrote: > On 04/03/2019 12:12, KnightMare wrote: [...] > > 3) closures: do the closures have any internal types that helps to > > GC or are they (full closure memory block) scanned as in the > > conservative mode? >

Re: precise GC

2019-03-05 Thread Rainer Schuetze via Digitalmars-d-learn
On 04/03/2019 12:12, KnightMare wrote: > For example, we have some rooted memory block as > auto rooted = new long[1_000_000]; > 1) conservative-GC will scan it for false pointers every GC-cycle. is it > true? > 2) precise-GC will NOT scan it at all. is it true? As A

Re: precise GC

2019-03-04 Thread Adam D. Ruppe via Digitalmars-d-learn
or structs with static blocks. struct { int a; void* b; } The old GC would treat that whole struct as potentially pointers, both a and b. The new precise GC would know only b needs to be scanned inside that struct. The even bigger deal with precise is it also knows only b would need

Re: precise GC

2019-03-04 Thread KnightMare via Digitalmars-d-learn
IMO need more explanations about precise-GC and cases where behavior of precise and conservative same and differs

Re: precise GC

2019-03-04 Thread KnightMare via Digitalmars-d-learn
/* English is not my native, and I tried to use Google translate. I hope u will understand subtleties of questions */ For precise-GC: 3) closures: do the closures have any internal types that helps to GC or are they (full closure memory block) scanned as in the conservative mode? 4

precise GC

2019-03-04 Thread KnightMare via Digitalmars-d-learn
As I understood conservative-GC scans all allocated memory blocks for false pointers. In other hand precise-GC scans only explicit memory blocks that contains (objects of types that contains) pointers/refs or "muddy" types (void, void[]...). For example, we have some rooted me

Re: Regarding the more precise GC

2012-04-22 Thread Dmitry Olshansky
On 22.04.2012 4:28, bearophile wrote: In the main D newsgroup I have seen the two recent threads regarding a more precise GC in D. I have two questions about that, that seem more fit for D.learn. 1) I have not fully understood the performance and memory implications of the more precise GC