digitalmars.D.announce - Updated compiler-benchmark
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (19/19) Jul 16 2020 I've updated
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Jul 16 2020 With DMD, that is.
- jmh530 (4/12) Jul 16 2020 How are the functions generated? I see something about
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/5) Jul 16 2020 Ah, I'll add that. Thanks
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (3/6) Jul 16 2020 Added here
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (5/8) Jul 16 2020 This is, of course, a very contrived benchmark but I had to pick
- jmh530 (2/10) Jul 16 2020 Thanks!
- IGotD- (5/8) Jul 16 2020 I don't think this comparison is fair as dmd is far behind when
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (17/27) Jul 17 2020 Both dmd and ldc have superior check stage (lexical, syntactic
I've updated https://github.com/nordlow/compiler-benchmark with - source variants with templated function variants for languages having generics - stdout-printing in Markdown (used in README.md) - benchmarks for the languages Zig and V D's compiler `dmd` is still far ahead of all its competition especially when it comes to default build (standard compilation) performance. The performance of both GCC and Clang gets significanly worse with each new release (currently 8, 9, 10 in the table below). The generic C++ and D versions compiles about 1.5 to 2 times slower whereas the generic Rust version interestingly is processed 2-3 times faster than the non-generic version.
Jul 16 2020
On Thursday, 16 July 2020 at 15:56:45 UTC, Per Nordlöw wrote:The generic C++ and D versions compiles about 1.5 to 2 times slowerWith DMD, that is.
Jul 16 2020
On Thursday, 16 July 2020 at 15:56:45 UTC, Per Nordlöw wrote:I've updated https://github.com/nordlow/compiler-benchmark with - source variants with templated function variants for languages having generics - stdout-printing in Markdown (used in README.md) - benchmarks for the languages Zig and V [snip]How are the functions generated? I see something about function-depth, but it might be good to have an example in the readme.
Jul 16 2020
On Thursday, 16 July 2020 at 18:27:54 UTC, jmh530 wrote:How are the functions generated? I see something about function-depth, but it might be good to have an example in the readme.Ah, I'll add that. Thanks
Jul 16 2020
On Thursday, 16 July 2020 at 18:27:54 UTC, jmh530 wrote:How are the functions generated? I see something about function-depth, but it might be good to have an example in the readme.Added here https://github.com/nordlow/compiler-benchmark#sample-generated-code
Jul 16 2020
On Thursday, 16 July 2020 at 18:27:54 UTC, jmh530 wrote:How are the functions generated? I see something about function-depth, but it might be good to have an example in the readme.This is, of course, a very contrived benchmark but I had to pick something to get me started and I'll happily receive suggestions on how to improve the benchmarking-relevance of the generated code.
Jul 16 2020
On Thursday, 16 July 2020 at 19:08:59 UTC, Per Nordlöw wrote:On Thursday, 16 July 2020 at 18:27:54 UTC, jmh530 wrote:Thanks!How are the functions generated? I see something about function-depth, but it might be good to have an example in the readme.This is, of course, a very contrived benchmark but I had to pick something to get me started and I'll happily receive suggestions on how to improve the benchmarking-relevance of the generated code.
Jul 16 2020
On Thursday, 16 July 2020 at 15:56:45 UTC, Per Nordlöw wrote:D's compiler `dmd` is still far ahead of all its competition especially when it comes to default build (standard compilation) performance.I don't think this comparison is fair as dmd is far behind when it comes to code generation compared to the competitors. What should be included are benchmarks done with LDC as well. Since you already have the D code, adding LDC should be pretty easy.
Jul 16 2020
On Thursday, 16 July 2020 at 23:36:58 UTC, IGotD- wrote:On Thursday, 16 July 2020 at 15:56:45 UTC, Per Nordlöw wrote:Both dmd and ldc have superior check stage (lexical, syntactic and semantic analysis) because of a language designed in conjunction with the needs and limitations of a compiler. One key-property of such a design is that the D language is design to be a so called, single-pass language. The compiler dmd is superior because of a super-fast but less qualitative code generation giving outstanding productivity incremental development. At that stage in the development cycle fast builds is much more important that optimized machine code. The machine code generated by dmd in this stage is sufficiently fast for the needs of the developer trying to be productive in this stage. That is by design, not by accident. I suggest you ask Walter Bright if you want more details around his design. The compiler ldc is about 10x slower than dmd for the debug stage because of the larger overhead of the LLVM-backend and is often preferred when doing release builds.D's compiler `dmd` is still far ahead of all its competition especially when it comes to default build (standard compilation) performance.I don't think this comparison is fair as dmd is far behind when it comes to code generation compared to the competitors. What should be included are benchmarks done with LDC as well. Since you already have the D code, adding LDC should be pretty easy.
Jul 17 2020