D.gnu - GDCs emitted code is crazy fast
- James Blachly (9/9) Aug 18 2019 I got around to finally compiling my project (processing high throughput...
- Daniel Kozak (5/15) Aug 19 2019 It is possible, to share your code, so any one else could try why
- Iain Buclaw (6/23) Aug 19 2019 Optimal code sometimes needs a bit of coercing. You shouldn't need to
- Daniel =?UTF-8?B?S296w6Fr?= (9/11) Aug 19 2019 Yes I agree, generaly one is good with -O and -(f)release and
- Iain Buclaw (5/14) Aug 19 2019 Surely LTO solves the cross-module inlining problem?
- Daniel Kozak (5/20) Aug 20 2019 I guess it would, but I haven't try it wit LTO-enabled phobos, so
- James Blachly (3/7) Aug 19 2019 Upon further testing (replicates) it is looking perhaps only 50% faster....
- Daniel Kozak (3/7) Aug 19 2019 which OS/Distro, if you want I can try to make some binary for you
- James Blachly (10/20) Aug 19 2019 That is a very generous offer, thank you. I will try to spin up a VM in
- Daniel Kozak (3/7) Aug 20 2019 Yes, I do. I know many people who would prefere to just download
- Iain Buclaw (13/22) Aug 19 2019 The require template is in gdc-9. Future releases should hopefully
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.
Aug 18 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)
Aug 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:Optimal code sometimes needs a bit of coercing. You shouldn't need to pass weird options though. -- IainI 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)
Aug 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
Aug 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:Surely LTO solves the cross-module inlining problem? -- IainOptimal 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.
Aug 19 2019
On Monday, 19 August 2019 at 14:02:37 UTC, Iain Buclaw wrote:On Mon, 19 Aug 2019 at 15:30, Daniel Kozák via D.gnu <d.gnu puremagic.com> wrote:I guess it would, but I haven't try it wit LTO-enabled phobos, so it does not seems to work for me [1]. [1] https://github.com/ldc-developers/ldc/issues/2182#issuecomment-343154497On Monday, 19 August 2019 at 10:54:09 UTC, Iain Buclaw wrote:Surely LTO solves the cross-module inlining problem?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.
Aug 20 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.
Aug 19 2019
On Monday, 19 August 2019 at 03:47:04 UTC, James Blachly wrote: I hope that there are plans forconvenient 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
Aug 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 forThat 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 regardsconvenient 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
Aug 19 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.
Aug 20 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
Aug 19 2019