Re: General performance tips

2017-01-23 Thread kinke via Digitalmars-d-learn
On Monday, 23 January 2017 at 12:13:30 UTC, albert-j wrote: There's not much object creation going on there, mostly loops over arrays, so I assume GC is not an issue. When passing arrays around, beware that static arrays are value types in D and are copied unless passed by reference.

Re: General performance tips

2017-01-23 Thread sarn via Digitalmars-d-learn
On Monday, 23 January 2017 at 12:13:30 UTC, albert-j wrote: Well it is actually ODE solver from Numerical recipes (originally in C++) that I am trying to do in D. Code translation seems very straightforward. Maybe there's someone around who has done that already? There's not much object

Re: General performance tips

2017-01-23 Thread albert-j via Digitalmars-d-learn
Without seeing the source there is nothing we can do. Usually performant d-code looks quite diffrent from java code. For example to avoid the gc :) Well it is actually ODE solver from Numerical recipes (originally in C++) that I am trying to do in D. Code translation seems very

Re: General performance tips

2017-01-23 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 23 January 2017 at 11:11:21 UTC, albert-j wrote: I have translated some simulation code from Java into D (a few classes, mostly manipulation of double arrays in small methods). D version runs 10-30% slower than Java (ldc2, dub release build). Profiling did not show any obvious

General performance tips

2017-01-23 Thread albert-j via Digitalmars-d-learn
I have translated some simulation code from Java into D (a few classes, mostly manipulation of double arrays in small methods). D version runs 10-30% slower than Java (ldc2, dub release build). Profiling did not show any obvious bottlenecks. I am wondering whether I missed something, or such