Re: Faster Dlang Execution

2021-06-08 Thread mw via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 22:04:26 UTC, seany wrote: The program is trying to categorize GPS tracks. It has to identify track that count as (somewhat) parallel (this is difficult to define) . Maybe this is what you looking for: https://en.wikipedia.org/wiki/Dynamic_time_warping and you

Re: Faster Dlang Execution

2021-06-08 Thread seany via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 18:03:32 UTC, H. S. Teoh wrote: But more importantly, if you can elaborate a bit more on what your program is trying to do, it would help us give more specific recommendations. There may be domain-specific optimizations that you could apply as well. T Hi

Re: Faster Dlang Execution

2021-06-08 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jun 08, 2021 at 05:10:47PM +, seany via Digitalmars-d-learn wrote: [...] > Profiling doesn't help, because different input is causing different > parts of the program to become slow. [...] Do you have any more specific information about what kind of inputs cause which parts of the

Re: Faster Dlang Execution

2021-06-08 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 17:10:47 UTC, seany wrote: Hello How can I increase the speed of executable files created via : `dub build -b release` try `dub build -b release --compiler=ldc2` Then you can set some specific DFlags for ldc, like -O3 or --mcpu I am unable to parallellise all of

Re: Faster Dlang Execution

2021-06-08 Thread Jack via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 17:40:19 UTC, Basile B. wrote: On Tuesday, 8 June 2021 at 17:10:47 UTC, seany wrote: Hello How can I increase the speed of executable files created via : `dub build -b release` try `dub build -b release --compiler=ldc2` Then you can set some specific DFlags for

Re: Faster Dlang Execution

2021-06-08 Thread mw via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 17:10:47 UTC, seany wrote: Hello How can I increase the speed of executable files created via : `dub build -b release` I am unable to parallellise all of it, as it depends on part of the result being calculated before something else can be calculated. You need

Faster Dlang Execution

2021-06-08 Thread seany via Digitalmars-d-learn
Hello How can I increase the speed of executable files created via : `dub build -b release` I am unable to parallellise all of it, as it depends on part of the result being calculated before something else can be calculated. I have many `nonsafe, nonpure` functions. Classes are virtual by

Re: how do i fix this node_dlang error?

2021-06-08 Thread Jack via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 03:04:39 UTC, Mike Parker wrote: On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote: the dll which I was just build with dub command? how I have a version mismatch if they're the very same file? Electron embeds node and does not use whatever you have on your

Re: how do i fix this node_dlang error?

2021-06-08 Thread Jack via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 04:56:27 UTC, NotSpooky wrote: On Tuesday, 8 June 2021 at 03:04:39 UTC, Mike Parker wrote: On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote: [...] Electron embeds node and does not use whatever you have on your system. So if there’s a mismatch between the

Re: dub build output redirect

2021-06-08 Thread seany via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 14:15:47 UTC, Steven Schveighoffer wrote: On 6/8/21 10:05 AM, seany wrote: Hi Thank you for pointing this out. Indeed, much later in the code, there is a `readln()`. But, the program needs to run 1-2 minutes, until it reaches that point - it is doing a complex AI

Re: dub build output redirect

2021-06-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/8/21 10:05 AM, seany wrote: Hi Thank you for pointing this out. Indeed, much later in the code, there is a `readln()`. But, the program needs to run 1-2 minutes, until it reaches that point - it is doing a complex AI calculation. However, for these 1-2 minutes, there is no output. Not

Re: dub build output redirect

2021-06-08 Thread seany via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 13:51:10 UTC, Steven Schveighoffer wrote: On 6/8/21 8:38 AM, seany wrote: I have compiled a complex project via `dub build`. I used both `-b release` and `-b debug`. But i cant redirect the output (generated by `writeln`) to a file. I call by : `./executable

Re: dub build output redirect

2021-06-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/8/21 8:38 AM, seany wrote: I have compiled a complex project via `dub build`. I used both `-b release` and `-b debug`. But i cant redirect the output (generated by `writeln`) to a file. I call by : `./executable --param p1 > a`. But execution hangs immediately. If I do `./executable

Re: how to enable safeD ? dmd.conf ? dmd switch ?

2021-06-08 Thread someone via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 07:46:43 UTC, Andrea Fontana wrote: Just mark main() function with @safe and you're done. Fine, thanks :) !

dub build output redirect

2021-06-08 Thread seany via Digitalmars-d-learn
I have compiled a complex project via `dub build`. I used both `-b release` and `-b debug`. But i cant redirect the output (generated by `writeln`) to a file. I call by : `./executable --param p1 > a`. But execution hangs immediately. If I do `./executable --param p1 ` no issue. What am I

Re: how to enable safeD ? dmd.conf ? dmd switch ?

2021-06-08 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 8 June 2021 at 02:47:18 UTC, someone wrote: https://dlang.org/articles/safed.html https://dlang.org/dmd-linux.html#switches http://ddili.org/ders/d.en/functions_more.html Neither man dmd nor man dmd.conf appear to have a related/switch setting. Does it means safeD is achieved by