Re: Disappointing performance from DMD/Phobos

2018-06-27 Thread Per Nordlöw via Digitalmars-d
On Wednesday, 27 June 2018 at 06:47:46 UTC, Manu wrote: This is some seriously good news for GDC. Awesome stuff guys! Agreed!

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Manu via Digitalmars-d
On Tue., 26 Jun. 2018, 11:45 am Iain Buclaw via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On 26 June 2018 at 20:07, Manu via Digitalmars-d > wrote: > > On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d > > wrote: > >> > >> On 26 June 2018 at 19:41, Manu via Digitalmars-d >

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Basile B. via Digitalmars-d
On Tuesday, 26 June 2018 at 02:20:37 UTC, Manu wrote: On Mon, 25 Jun 2018 at 19:10, Manu wrote: Some code: - struct Entity { enum NumSystems = 4; struct SystemData { uint start, length; } SystemData[NumSystems] systemData; @property uint systemBi

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, June 26, 2018 10:38:42 Manu via Digitalmars-d wrote: > On Mon, 25 Jun 2018 at 20:17, Jonathan M Davis via Digitalmars-d > > wrote: > > dmd's inliner is notoriously poor, > > I know, but it's still the reference compiler, and it should at least > to a reasonable job at the kind of D cod

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread kinke via Digitalmars-d
On Tuesday, 26 June 2018 at 17:38:42 UTC, Manu wrote: I know, but it's still the reference compiler, and it should at least to a reasonable job at the kind of D code that it's *recommended* that users write. I get your point, but IMO it's all about efficient allocation of the manpower we hav

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Iain Buclaw via Digitalmars-d
On 26 June 2018 at 20:07, Manu via Digitalmars-d wrote: > On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d > wrote: >> >> On 26 June 2018 at 19:41, Manu via Digitalmars-d >> wrote: >> > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d >> > wrote: >> >> >> >> Then use L

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Iain Buclaw via Digitalmars-d
On 26 June 2018 at 20:26, Eugene Wissner via Digitalmars-d wrote: > On Tuesday, 26 June 2018 at 18:07:56 UTC, Manu wrote: >> >> On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d >> wrote: >>> >>> >>> On 26 June 2018 at 19:41, Manu via Digitalmars-d >>> wrote: >>> > On Mon, 25 Jun 2018

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 26 June 2018 at 18:07:56 UTC, Manu wrote: On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d wrote: On 26 June 2018 at 19:41, Manu via Digitalmars-d wrote: > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via > Digitalmars-d wrote: >> >> Then use LDC! ;) > > Keep LDC u

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Manu via Digitalmars-d
On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d wrote: > > On 26 June 2018 at 19:41, Manu via Digitalmars-d > wrote: > > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d > > wrote: > >> > >> Then use LDC! ;) > > > > Keep LDC up to date with DMD master daily! ;) > > Lik

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Iain Buclaw via Digitalmars-d
On 26 June 2018 at 19:41, Manu via Digitalmars-d wrote: > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d > wrote: >> >> Then use LDC! ;) > > Keep LDC up to date with DMD master daily! ;) Like what GDC is doing (almost) ;-) Iain.

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Manu via Digitalmars-d
On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d wrote: > > Then use LDC! ;) Keep LDC up to date with DMD master daily! ;)

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread Manu via Digitalmars-d
On Mon, 25 Jun 2018 at 20:17, Jonathan M Davis via Digitalmars-d wrote: > > dmd's inliner is notoriously poor, I know, but it's still the reference compiler, and it should at least to a reasonable job at the kind of D code that it's *recommended* that users write. That line of code is the sort of

Re: Disappointing performance from DMD/Phobos

2018-06-26 Thread H. S. Teoh via Digitalmars-d
When I see "DMD" and "performance" in the same sentence, my first reaction is, "why aren't you using LDC or GDC"? Seriously, doing performance measurements with DMD is a waste of time, because its optimizer has been proven time and again to be suboptimal (har!). DMD frequently produces suboptimal

Re: Disappointing performance from DMD/Phobos

2018-06-25 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 26 June 2018 at 02:10:17 UTC, Manu wrote: Some code: - struct Entity { enum NumSystems = 4; struct SystemData { uint start, length; } SystemData[NumSystems] systemData; @property uint systemBits() const { return systemData[].map!(e =>

Re: Disappointing performance from DMD/Phobos

2018-06-25 Thread Nathan S. via Digitalmars-d
On Tuesday, 26 June 2018 at 02:20:37 UTC, Manu wrote: I optimised another major gotcha eating perf, and now this issue is taking 13% of my entire work time... bummer. Without disagreeing with you, ldc2 optimizes this fine. https://run.dlang.io/is/NJct6U const @property uint onlineapp.Enti

Re: Disappointing performance from DMD/Phobos

2018-06-25 Thread David Bennett via Digitalmars-d
On Tuesday, 26 June 2018 at 02:10:17 UTC, Manu wrote: [snip] @property uint systemBits() const { return systemData[].map!(e => e.length).sum; } [snip] This property sum's 4 ints... that should be insanely fast. It should also be something like 5-8 lines of asm. Turns out, that call to sum(

Re: Disappointing performance from DMD/Phobos

2018-06-25 Thread Jonathan M Davis via Digitalmars-d
On Monday, June 25, 2018 19:10:17 Manu via Digitalmars-d wrote: > Some code: > - > struct Entity > { > enum NumSystems = 4; > struct SystemData > { > uint start, length; > } > SystemData[NumSystems] systemData; > @property uint systemBits() const { re

Re: Disappointing performance from DMD/Phobos

2018-06-25 Thread Manu via Digitalmars-d
On Mon, 25 Jun 2018 at 19:10, Manu wrote: > > Some code: > - > struct Entity > { > enum NumSystems = 4; > struct SystemData > { > uint start, length; > } > SystemData[NumSystems] systemData; > @property uint systemBits() const { return systemData[].m

Disappointing performance from DMD/Phobos

2018-06-25 Thread Manu via Digitalmars-d
Some code: - struct Entity { enum NumSystems = 4; struct SystemData { uint start, length; } SystemData[NumSystems] systemData; @property uint systemBits() const { return systemData[].map!(e => e.length).sum; } } Entity e; e.systemBits(); // <- call th