Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:59:08 UTC, bauss wrote: It's just used to speed-up the GC. Yeah, I got the point, but to be absolutely honest, I (>20 years of C coding) do not like GC as such. I believe manual free() is not that 'hard'. And one must still release other resources. (in C I wri

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:46:36 UTC, eugene wrote: On Friday, 10 September 2021 at 12:10:58 UTC, Adam D Ruppe wrote: btw why do the threads cause you trouble? Well... probably it is subjective thing - just do not 'like' when a program is doing something that is not explicitly in it's

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:10:58 UTC, Adam D Ruppe wrote: btw why do the threads cause you trouble? Well... probably it is subjective thing - just do not 'like' when a program is doing something that is not explicitly in it's source (I am C coder, you guessed). More specifically - I ha

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Adam D Ruppe via Digitalmars-d-learn
btw why do the threads cause you trouble?

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:53:04 UTC, eugene wrote: On Friday, 10 September 2021 at 11:32:02 UTC, Adam D Ruppe wrote: You either pass as an argument *to your application* --DRT-gcopt=parallel:0 oops... :) ps xH | grep [e]cho 5727 pts/14 S+ 0:13 ./echo-server --DRT-gcopt=parall

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/10/21 7:47 AM, eugene wrote: On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: --DRT-gcopt=parallel:2 on the command line. A value of 0 disables parallel marking completely. but it does not: make -f Makefile-dmd dmd --DRT-gcopt=parallel:0 engine/*.d common-sm/*.d server-sm/*.d p

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:32:02 UTC, Adam D Ruppe wrote: You either pass as an argument *to your application* --DRT-gcopt=parallel:0 oops... :)

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: --DRT-gcopt=parallel:2 on the command line. A value of 0 disables parallel marking completely. but it does not: make -f Makefile-dmd dmd --DRT-gcopt=parallel:0 engine/*.d common-sm/*.d server-sm/*.d pool.d echo_server.d -ofecho-server

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: What are these extra threads for? GC? So I think it is **very aggressive usage** of DList that causes this. Yeah, in newer versions, when the garbage collector does its first collect, it spawns some helper threads to speed up its ma

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: Here's the specific change: https://dlang.org/changelog/2.087.0.html#gc_parallel thanx a lot!

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:20:52 UTC, drug wrote: It is off-topic a bit I am newbie - have been learning D for about 2 months or so. I understand that my question is not about the language itself, just picked forum for new users. but I think none can compare gdc 4.9.2 to same pictur

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Mike Parker via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:20:10 UTC, eugene wrote: same picture with gdc 8.4.0 - one thread, no pthread_create() behind the scenes. GDC is stuck on a much older version of D. Iain has backported some bugfixes and optimizations, but featurewise it's mostly D 2.076. This is because

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:39:48 UTC, Basile B. wrote: On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: Here is test program (which is using DList aggressively) [...] Can this (really unwanted) behavior be disabled in DMD? I do not want to have multiple threads, a program (rea

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Basile B. via Digitalmars-d-learn
On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: Here is test program (which is using DList aggressively) [...] Can this (really unwanted) behavior be disabled in DMD? I do not want to have multiple threads, a program (real program, not the test above) has to be single-threaded. sys

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread drug via Digitalmars-d-learn
10.09.2021 12:27, eugene пишет: //import std.container.dlist; // dmd (v2.097.2) import std.container: DList; // gdc (4.9.2) It is off-topic a bit but I think none can compare gdc 4.9.2 to dmd 2.097.2 because gdc has older version than dmd. I would compare gdc to appropriate dmd version, it

GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
Here is test program (which is using DList aggressively) ```d import std.stdio : writeln; import core.sys.posix.unistd : sleep; //import std.container.dlist; // dmd (v2.097.2) import std.container: DList; // gdc (4.9.2) void main() { auto list = DList!(int)(); int k; while (true) {