Jump to page: 1 2
Thread overview
GDCs emitted code is crazy fast
Aug 19, 2019
James Blachly
Aug 19, 2019
Daniel Kozak
Aug 19, 2019
Iain Buclaw
Aug 19, 2019
Daniel Kozák
Aug 19, 2019
Iain Buclaw
Aug 20, 2019
Daniel Kozak
Aug 20, 2019
James Blachly
Aug 19, 2019
Daniel Kozak
Aug 20, 2019
James Blachly
Aug 20, 2019
Daniel Kozak
Aug 19, 2019
Iain Buclaw
August 18, 2019
I got around to finally compiling my project (processing high throughput sequencing data) and found GDC compiled code executed TWICE as fast as LDC compiled code, which itself was faster than DMD. I am truly surprised.

Can't test all my code yet as GDC 8.3.0 doesn't include support for assoc array require. I hope that there are plans for convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.

Kudos to the GDC team.
August 19, 2019
On Monday, 19 August 2019 at 03:47:04 UTC, James Blachly wrote:
> I got around to finally compiling my project (processing high throughput sequencing data) and found GDC compiled code executed TWICE as fast as LDC compiled code, which itself was faster than DMD. I am truly surprised.
>
> Can't test all my code yet as GDC 8.3.0 doesn't include support for assoc array require. I hope that there are plans for convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.
>
> Kudos to the GDC team.

It is possible, to share your code, so any one else could try why is gdc faster than ldc? From what I can say, there is almost always a way to make ldc as fast as gdc (sometimes you need to pass some specific args to cimpiler or tweak a code a little bit)
August 19, 2019
On Monday, 19 August 2019 at 03:47:04 UTC, James Blachly wrote:
I hope that there are plans for
> convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.
>
> Kudos to the GDC team.

which OS/Distro, if you want I can try to make some binary for you


August 19, 2019
On Mon, 19 Aug 2019 at 10:00, Daniel Kozak via D.gnu <d.gnu@puremagic.com> wrote:
>
> On Monday, 19 August 2019 at 03:47:04 UTC, James Blachly wrote:
> > I got around to finally compiling my project (processing high throughput sequencing data) and found GDC compiled code executed TWICE as fast as LDC compiled code, which itself was faster than DMD. I am truly surprised.
> >
> > Can't test all my code yet as GDC 8.3.0 doesn't include support for assoc array require. I hope that there are plans for convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.
> >
> > Kudos to the GDC team.
>
> It is possible, to share your code, so any one else could try why is gdc faster than ldc? From what I can say, there is almost always a way to make ldc as fast as gdc (sometimes you need to pass some specific args to cimpiler or tweak a code a little bit)

Optimal code sometimes needs a bit of coercing.  You shouldn't need to pass weird options though.

-- 
Iain
August 19, 2019
On Mon, 19 Aug 2019 at 05:50, James Blachly via D.gnu <d.gnu@puremagic.com> wrote:
>
> I got around to finally compiling my project (processing high throughput sequencing data) and found GDC compiled code executed TWICE as fast as LDC compiled code, which itself was faster than DMD. I am truly surprised.
>
> Can't test all my code yet as GDC 8.3.0 doesn't include support for assoc array require. I hope that there are plans for convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.
>
> Kudos to the GDC team.

The require template is in gdc-9.  Future releases should hopefully follow closely to dmd, we'll wait to see if this can be done for gcc-10 as am currently blocked on upstream dmd breakages that are being slow to get turned around.

The releases of gcc itself are typically in the first week of May, and dmd releases on the 1st every three months, one them being May, to give an idea of what version is anticipated for gcc-10 and future releases, the latest release will never be older than 12 months behind.

-- 
Iain
August 19, 2019
On Monday, 19 August 2019 at 10:54:09 UTC, Iain Buclaw wrote:
>
> Optimal code sometimes needs a bit of coercing.  You shouldn't need to pass weird options though.

Yes I agree, generaly one is good with -O and -(f)release and sometimes with disable boundscheking, but with ldc there has been some issue with cross module inlining, so I need to use -enable-cross-module-inlining [1][2][3] to improve speed in past, but maybe it is not needed anymore.


[1] https://github.com/ldc-developers/ldc/issues/2552
[2] https://github.com/ldc-developers/ldc/issues/2182
[3] https://github.com/ldc-developers/ldc/pull/2738
August 19, 2019
On Mon, 19 Aug 2019 at 15:30, Daniel Kozák via D.gnu <d.gnu@puremagic.com> wrote:
>
> On Monday, 19 August 2019 at 10:54:09 UTC, Iain Buclaw wrote:
> >
> > Optimal code sometimes needs a bit of coercing.  You shouldn't need to pass weird options though.
>
> Yes I agree, generaly one is good with -O and -(f)release and sometimes with disable boundscheking, but with ldc there has been some issue with cross module inlining, so I need to use -enable-cross-module-inlining [1][2][3] to improve speed in past, but maybe it is not needed anymore.
>

Surely LTO solves the cross-module inlining problem?

-- 
Iain

August 19, 2019
On 8/19/19 3:59 AM, Daniel Kozak wrote:
> It is possible, to share your code, so any one else could try why is gdc faster than ldc? From what I can say, there is almost always a way to make ldc as fast as gdc (sometimes you need to pass some specific args to cimpiler or tweak a code a little bit)

Upon further testing (replicates) it is looking perhaps only 50% faster. Still, very nice. Once we open up the repository I'll try to report back.

August 19, 2019
On 8/19/19 4:02 AM, Daniel Kozak wrote:
> On Monday, 19 August 2019 at 03:47:04 UTC, James Blachly wrote:
> I hope that there are plans for
>> convenient binary installs (rather than through package managers which tend to be outdated, and cannot be installed on managed systems) as there are with DMD and LDC.
>>
>> Kudos to the GDC team.
> 
> which OS/Distro, if you want I can try to make some binary for you
> 

That is a very generous offer, thank you. I will try to spin up a VM in which I can install a newer GDC.

As a broader point, though, do you think it would help improve adoption of GDC (and perhaps the D ecosystem overall) if one could `tar xfvz gdc-9.tar.gz && export PATH gdc/bin` in the same way we do with DMD and LDC? I understand this has not been the traditional model with GCC, but then again the LDC team do not iterate only when LLVM updates major version either.

Kind regards


August 20, 2019
On Tuesday, 20 August 2019 at 02:18:42 UTC, James Blachly wrote:
>
> As a broader point, though, do you think it would help improve adoption of GDC (and perhaps the D ecosystem overall) if one could `tar xfvz gdc-9.tar.gz && export PATH gdc/bin` in the same way we do with DMD and LDC?

Yes, I do. I know many people who would prefere to just download some archive unpack it and use it.



« First   ‹ Prev
1 2