digitalmars.D.announce - Compiler benchmarker for D, C, C++, Go, Rust with more to come
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (69/69) Mar 16 2019 After reading
- Jacob Carlborg (5/83) Mar 17 2019 It would be interesting to measure D's speed with DMD compiled with LDC
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Mar 17 2019 I thought that already is the case...
- Jacob Carlborg (4/5) Mar 18 2019 No, the official binaries are built with DMD as the host compiler.
- aliak (3/7) Mar 18 2019 How come they're not built with LDC (for example) and then
- Seb (6/15) Mar 18 2019 Yes it would be _a lot_ faster, but the release process is pretty
- Andre Pany (7/23) Mar 18 2019 It would be great if a campaign (donations) could be created to
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (3/4) Mar 18 2019 Does this include a script for building dmd with ldc or this not
- Seb (14/18) Mar 19 2019 Well, you don't really need a script:
- Atila Neves (7/21) Mar 19 2019 HOST_DMD=ldmd2 make -f posix.mak -j`nproc`
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (5/10) Mar 19 2019 I'm building DMD packages for RPM-based distros [1], and I'm
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/7) Mar 20 2019 Thanks!
- Andrea Fontana (3/7) Mar 18 2019 Is v2.0xx compiled with v2.0xx-1 or with v2.0xx itself?
- Jacob Carlborg (4/5) Mar 18 2019 With v2.0xx-1, as far as I understand.
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/3) Oct 17 2019 Just added support for V (vlang.io), Zig and Julia.
- =?UTF-8?B?TcOhcmNpbw==?= Martins (3/6) Oct 21 2019 Very interesting - thanks for this!
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (4/5) Oct 21 2019 What do you mean by `gc`?
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (3/6) Oct 21 2019 Note that I just changed `-c` to `-S` in the call go `gccgo` in
- =?UTF-8?B?TcOhcmNpbw==?= Martins (3/9) Oct 21 2019 That's google reference implementation. Sort of like `DMD`,
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Oct 21 2019 Is it prepackaged on Ubuntu?
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/3) Oct 21 2019 Do you mean the package golang-go?
- =?UTF-8?B?TcOhcmNpbw==?= Martins (3/6) Oct 21 2019 Most likely it is that one, but also, very likely to be outdated.
- Russel Winder (15/19) Oct 21 2019 On Mon, 2019-10-21 at 12:25 +0000, Per Nordl=C3=B6w via Digitalmars-d-an...
After reading https://forum.dlang.org/thread/nlhybmioaoxkydicmtjj forum.dlang.org it's about time I announce my little Python snippet that exercises the compilation speed of D and other languages with a superficial test program generator at https://github.com/nordlow/compiler-benchmark Run as ./benchmark.py This generates a single source file for each supported language, currently D, C, C++, Go and Rust, containing 50k number of trivial functions that from the main function are called and reduced to a single integer which is returned at the end of main. The benchmark then measures the time it takes for each compiler to run semantic analysis on the source file (excluding output of any object files). My only question is: How is it possible for Rust be to 50x slower than D in this test!!!??? Am I calling rustc in the wrong way? Especially taking into account the amount of time (and money) that has been put into making Rust fast(er). Through fancy caching of IR-files and more. I very much welcome PRs that add more languages. Output on Ubuntu 18.04 system is Code-generation: Generating generated/c/foo.c took 0.073 seconds (C) Generating generated/c++/foo.c++ took 0.073 seconds (C++) Generating generated/d/foo.d took 0.076 seconds (D) Generating generated/rust/foo.rs took 0.076 seconds (Rust) Generating generated/zig/foo.zig took 0.077 seconds (Zig) Generating generated/go/foo.go took 0.074 seconds (Go) Clang: - Checking of generated/c/foo.c took 1.373 seconds (using "/usr/bin/clang-7") - Checking of generated/c++/foo.c++ took 1.345 seconds (using "/usr/bin/clang++-7") GCC: - Checking of generated/c/foo.c took 0.385 seconds (using "/usr/bin/gcc-5") - Checking of generated/c++/foo.c++ took 0.675 seconds (using "/usr/bin/g++-5") - Checking of generated/c/foo.c took 0.551 seconds (using "/usr/bin/gcc-6") - Checking of generated/c/foo.c took 0.518 seconds (using "/usr/bin/gcc-7") - Checking of generated/c++/foo.c++ took 1.294 seconds (using "/usr/bin/g++-7") - Checking of generated/c/foo.c took 0.527 seconds (using "/usr/bin/gcc-8") - Checking of generated/c++/foo.c++ took 1.363 seconds (using "/usr/bin/g++-8") D: - Checking of generated/d/foo.d took 0.403 seconds (using "/usr/bin/dmd") - Checking of generated/d/foo.d took 0.352 seconds (using "/home/per/.local/ldc2-1.15.0-beta1-linux-x86_64/bin/ldmd2") Go: - Checking of generated/go/foo.go took 1.716 seconds (using "/usr/bin/gccgo") Rust: - Checking of generated/rust/foo.rs took 17.828 seconds (using "/home/per/.cargo/bin/rustc") Zig: Speedups: - D to gcc-8: 1.50 - D to g++-8: 3.88 - D to Clang: 3.90 - D to Clang++: 3.83 - D to Go: 4.88 - D to Rust: 50.71
Mar 16 2019
On 2019-03-16 22:23, Per Nordlöw wrote:After reading https://forum.dlang.org/thread/nlhybmioaoxkydicmtjj forum.dlang.org it's about time I announce my little Python snippet that exercises the compilation speed of D and other languages with a superficial test program generator at https://github.com/nordlow/compiler-benchmark Run as ./benchmark.py This generates a single source file for each supported language, currently D, C, C++, Go and Rust, containing 50k number of trivial functions that from the main function are called and reduced to a single integer which is returned at the end of main. The benchmark then measures the time it takes for each compiler to run semantic analysis on the source file (excluding output of any object files). My only question is: How is it possible for Rust be to 50x slower than D in this test!!!??? Am I calling rustc in the wrong way? Especially taking into account the amount of time (and money) that has been put into making Rust fast(er). Through fancy caching of IR-files and more. I very much welcome PRs that add more languages. Output on Ubuntu 18.04 system is Code-generation: Generating generated/c/foo.c took 0.073 seconds (C) Generating generated/c++/foo.c++ took 0.073 seconds (C++) Generating generated/d/foo.d took 0.076 seconds (D) Generating generated/rust/foo.rs took 0.076 seconds (Rust) Generating generated/zig/foo.zig took 0.077 seconds (Zig) Generating generated/go/foo.go took 0.074 seconds (Go) Clang: - Checking of generated/c/foo.c took 1.373 seconds (using "/usr/bin/clang-7") - Checking of generated/c++/foo.c++ took 1.345 seconds (using "/usr/bin/clang++-7") GCC: - Checking of generated/c/foo.c took 0.385 seconds (using "/usr/bin/gcc-5") - Checking of generated/c++/foo.c++ took 0.675 seconds (using "/usr/bin/g++-5") - Checking of generated/c/foo.c took 0.551 seconds (using "/usr/bin/gcc-6") - Checking of generated/c/foo.c took 0.518 seconds (using "/usr/bin/gcc-7") - Checking of generated/c++/foo.c++ took 1.294 seconds (using "/usr/bin/g++-7") - Checking of generated/c/foo.c took 0.527 seconds (using "/usr/bin/gcc-8") - Checking of generated/c++/foo.c++ took 1.363 seconds (using "/usr/bin/g++-8") D: - Checking of generated/d/foo.d took 0.403 seconds (using "/usr/bin/dmd") - Checking of generated/d/foo.d took 0.352 seconds (using "/home/per/.local/ldc2-1.15.0-beta1-linux-x86_64/bin/ldmd2") Go: - Checking of generated/go/foo.go took 1.716 seconds (using "/usr/bin/gccgo") Rust: - Checking of generated/rust/foo.rs took 17.828 seconds (using "/home/per/.cargo/bin/rustc") Zig: Speedups: - D to gcc-8: 1.50 - D to g++-8: 3.88 - D to Clang: 3.90 - D to Clang++: 3.83 - D to Go: 4.88 - D to Rust: 50.71It would be interesting to measure D's speed with DMD compiled with LDC as the host D compiler. -- /Jacob Carlborg
Mar 17 2019
On Sunday, 17 March 2019 at 09:17:06 UTC, Jacob Carlborg wrote:It would be interesting to measure D's speed with DMD compiled with LDC as the host D compiler.I thought that already is the case...
Mar 17 2019
On 2019-03-17 21:09, Per Nordlöw wrote:I thought that already is the case...No, the official binaries are built with DMD as the host compiler. -- /Jacob Carlborg
Mar 18 2019
On Monday, 18 March 2019 at 10:05:40 UTC, Jacob Carlborg wrote:On 2019-03-17 21:09, Per Nordlöw wrote:How come they're not built with LDC (for example) and then distributed? I'd think it'd be shit tonnes more performant?I thought that already is the case...No, the official binaries are built with DMD as the host compiler.
Mar 18 2019
On Monday, 18 March 2019 at 11:02:55 UTC, aliak wrote:On Monday, 18 March 2019 at 10:05:40 UTC, Jacob Carlborg wrote:Yes it would be _a lot_ faster, but the release process is pretty complicated [1] and at the moment Martin is the only one who fully understands it and he's pretty busy with his day job and other tasks. [1] https://github.com/dlang/installerOn 2019-03-17 21:09, Per Nordlöw wrote:How come they're not built with LDC (for example) and then distributed? I'd think it'd be shit tonnes more performant?I thought that already is the case...No, the official binaries are built with DMD as the host compiler.
Mar 18 2019
On Monday, 18 March 2019 at 12:33:12 UTC, Seb wrote:On Monday, 18 March 2019 at 11:02:55 UTC, aliak wrote:It would be great if a campaign (donations) could be created to overwork the release process. There are some quite important topics like 64 bit DMD for windows or the LDC builds. Also the process should be easier and maybe even documented. Kind regards AndreOn Monday, 18 March 2019 at 10:05:40 UTC, Jacob Carlborg wrote:Yes it would be _a lot_ faster, but the release process is pretty complicated [1] and at the moment Martin is the only one who fully understands it and he's pretty busy with his day job and other tasks. [1] https://github.com/dlang/installerOn 2019-03-17 21:09, Per Nordlöw wrote:How come they're not built with LDC (for example) and then distributed? I'd think it'd be shit tonnes more performant?I thought that already is the case...No, the official binaries are built with DMD as the host compiler.
Mar 18 2019
On Monday, 18 March 2019 at 12:33:12 UTC, Seb wrote:[1] https://github.com/dlang/installerDoes this include a script for building dmd with ldc or this not yet possible?
Mar 18 2019
On Monday, 18 March 2019 at 21:34:40 UTC, Per Nordlöw wrote:On Monday, 18 March 2019 at 12:33:12 UTC, Seb wrote:Well, you don't really need a script: git clone https://github.com/dlang/dmd HOST_DMD=ldmd2 make -f posix.mak -j10 Additionally, you can add `ENABLE_RELEASE=1` to create a fully optimized release binary. This has been possible for a very long time and actually is even tested on every PR with SemaphoreCI (Linux) and AppVeyor (Windows). BTW, the Arch DMD package [1] is the only package that I know of which is actually using LDC to compile DMD for the released binaries. [1] https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dmd#n54[1] https://github.com/dlang/installerDoes this include a script for building dmd with ldc or this not yet possible?
Mar 19 2019
On Tuesday, 19 March 2019 at 10:10:28 UTC, Seb wrote:On Monday, 18 March 2019 at 21:34:40 UTC, Per Nordlöw wrote:HOST_DMD=ldmd2 make -f posix.mak -j`nproc` FTFY. It's bad enough make is a dinosaur that defaults to one thread, let's not hard-code the number of cores.On Monday, 18 March 2019 at 12:33:12 UTC, Seb wrote:Well, you don't really need a script: git clone https://github.com/dlang/dmd HOST_DMD=ldmd2 make -f posix.mak -j10[1] https://github.com/dlang/installerDoes this include a script for building dmd with ldc or this not yet possible?Additionally, you can add `ENABLE_RELEASE=1` to create a fully optimized release binary.Awesome.BTW, the Arch DMD package [1] is the only package that I know of which is actually using LDC to compile DMD for the released binaries.Huh, I didn't know that. Yay Arch! And yet, compilation times are still my mortal enemy...
Mar 19 2019
On Tuesday, 19 March 2019 at 10:10:28 UTC, Seb wrote:BTW, the Arch DMD package [1] is the only package that I know of which is actually using LDC to compile DMD for the released binaries. [1] https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dmd#n54I'm building DMD packages for RPM-based distros [1], and I'm using LDC too to compile it on Fedora since it's available in the official Fedora repositories. [1] https://copr.fedorainfracloud.org/coprs/tcg/devel/package/dmd/
Mar 19 2019
On Tuesday, 19 March 2019 at 10:10:28 UTC, Seb wrote:Well, you don't really need a script: git clone https://github.com/dlang/dmd HOST_DMD=ldmd2 make -f posix.mak -j10 Additionally, you can add `ENABLE_RELEASE=1` to create a fully optimized release binary.Thanks!
Mar 20 2019
On Monday, 18 March 2019 at 10:05:40 UTC, Jacob Carlborg wrote:On 2019-03-17 21:09, Per Nordlöw wrote:Is v2.0xx compiled with v2.0xx-1 or with v2.0xx itself? AndreaI thought that already is the case...No, the official binaries are built with DMD as the host compiler.
Mar 18 2019
On 2019-03-18 15:49, Andrea Fontana wrote:Is v2.0xx compiled with v2.0xx-1 or with v2.0xx itself?With v2.0xx-1, as far as I understand. -- /Jacob Carlborg
Mar 18 2019
On Saturday, 16 March 2019 at 21:23:18 UTC, Per Nordlöw wrote:https://github.com/nordlow/compiler-benchmarkJust added support for V (vlang.io), Zig and Julia.
Oct 17 2019
On Thursday, 17 October 2019 at 17:05:14 UTC, Per Nordlöw wrote:On Saturday, 16 March 2019 at 21:23:18 UTC, Per Nordlöw wrote:Very interesting - thanks for this! Any reason why you left Go's `gc` out?https://github.com/nordlow/compiler-benchmarkJust added support for V (vlang.io), Zig and Julia.
Oct 21 2019
On Monday, 21 October 2019 at 11:07:14 UTC, Márcio Martins wrote:Any reason why you left Go's `gc` out?What do you mean by `gc`? Is `gc` a checker or checker flag to some compiler? Can't find any relevant hits for hit the web.
Oct 21 2019
On Monday, 21 October 2019 at 11:27:05 UTC, Per Nordlöw wrote:On Monday, 21 October 2019 at 11:07:14 UTC, Márcio Martins wrote:Note that I just changed `-c` to `-S` in the call go `gccgo` in `benchmark` to skip assmembly phase.Any reason why you left Go's `gc` out?
Oct 21 2019
On Monday, 21 October 2019 at 11:27:05 UTC, Per Nordlöw wrote:On Monday, 21 October 2019 at 11:07:14 UTC, Márcio Martins wrote:That's google reference implementation. Sort of like `DMD`, should be faster, but generating less optimal code.Any reason why you left Go's `gc` out?What do you mean by `gc`? Is `gc` a checker or checker flag to some compiler? Can't find any relevant hits for hit the web.
Oct 21 2019
On Monday, 21 October 2019 at 11:59:15 UTC, Márcio Martins wrote:That's google reference implementation. Sort of like `DMD`, should be faster, but generating less optimal code.Is it prepackaged on Ubuntu?
Oct 21 2019
On Monday, 21 October 2019 at 12:12:56 UTC, Per Nordlöw wrote:Is it prepackaged on Ubuntu?Do you mean the package golang-go?
Oct 21 2019
On Monday, 21 October 2019 at 12:25:20 UTC, Per Nordlöw wrote:On Monday, 21 October 2019 at 12:12:56 UTC, Per Nordlöw wrote:Most likely it is that one, but also, very likely to be outdated. You can download the latest version at https://golang.org/dl/Is it prepackaged on Ubuntu?Do you mean the package golang-go?
Oct 21 2019
On Mon, 2019-10-21 at 12:25 +0000, Per Nordl=C3=B6w via Digitalmars-d-annou= nce wrote:On Monday, 21 October 2019 at 12:12:56 UTC, Per Nordl=C3=B6w wrote:I am not sure what Ubuntu package version is, with it's 6 month or 3 year update cycle it is almost certainly well out of date, but Debian Sid tries = to stay up to date. golang-go is currently golang-1.13-go but you can use the meta-package golang-1.13 to enforce that version. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.ukIs it prepackaged on Ubuntu?=20 Do you mean the package golang-go?
Oct 21 2019