March 04, 2017
On Friday, 3 March 2017 at 22:06:11 UTC, berni wrote:
> On Friday, 3 March 2017 at 20:10:25 UTC, Ali Çehreli wrote:
>> Which would put gdc in between the two. Is your experience different?
>
> Actually, I've got not much experience. A few weeks ago I ran a test where ldc was in between dmd and gdc. But I missed the -release flags then. With that flag it's faster, but still slower than gdc on that one (B below). With an other testcase, where I compared them, gdc and ldc are on equals speed (A below).
>
> A) dmd 52s, gdc 22s, ldc 22s
> B) dmd 432s, gdc 280s, ldc 310s

If you think you have a good testcase, it's nice for compiler devs like me to open a new thread about the difference that you found between the compilers (so that we can try and improve things). Depending on language/Phobos/druntime versions of DMD, LDC, and GDC, it's not always clear if the comparison is fair and the results can be skewed.

(that said, I think on average, gcc creates slightly faster binaries than clang, but those are highly developed compilers, and LDC (at least) isn't. So I am not surprised if GDC creates slightly faster binaries than LDC for some test cases. For other test cases, LDC wins, but those are not so interesting. Because I work on LDC, I'm always keen on seeing testcases where _GDC_ wins.)

Thanks!
  Johan
March 04, 2017
On Saturday, 4 March 2017 at 10:02:15 UTC, Johan Engelen wrote:
> If you think you have a good testcase, it's nice for compiler devs like me to open a new thread about the difference that you found between the compilers (so that we can try and improve things).

I'm not sure, if my "testcase" is generally a good one.

Here is some background: In the last 10 years I developed about 200 programs for checking logical puzzles (like sudoku), all written in java. About a year ago I decided to make these programs free software. But as I have to refactor them anyway and I dislike java meanwhile I decided to change the language when doing so.

I decided on a special puzzle type, called double mine (similar to minesweeper, but in every row and column, there have to be exactly two mines and mines may not touch, not even diagonally), to check out different languages. Speed was just one criterion when doing this.

At that time D wasn't among the candidates, because I did not know of this language at all. I added D later (with almost no knowledge about D) and checked out all three compilers.

If you think, this program could be usefull for you, I can email it to you...
March 05, 2017
On Saturday, 4 March 2017 at 18:45:22 UTC, berni wrote:
>
> [...]
>
> If you think, this program could be usefull for you, I can email it to you...

The smaller the testcase, the better. You mentioned that for testcase "B" there is a ~10% performance difference between GDC and LDC, so that's definitely worth looking into.
It's best to submit it in our issue tracker on github: https://github.com/ldc-developers/ldc/issues
So whenever someone has time and interest to look at runtime performance improvements, there are testcases to investigate :)

cheers,
  Johan

1 2
Next ›   Last »