Jump to page: 1 2 3
Thread overview
Benchmarking suite
Aug 29, 2015
qznc
Aug 29, 2015
Dmitry Olshansky
Aug 29, 2015
qznc
Aug 29, 2015
Dmitry Olshansky
Aug 30, 2015
qznc
Aug 30, 2015
Dmitry Olshansky
Aug 30, 2015
qznc
Aug 30, 2015
Dmitry Olshansky
Sep 07, 2015
qznc
Sep 07, 2015
Dmitry Olshansky
Sep 07, 2015
Suliman
Sep 09, 2015
Jack Stouffer
Aug 30, 2015
qznc
Sep 08, 2015
qznc
Sep 08, 2015
qznc
Sep 08, 2015
Isaac Gouy
Sep 08, 2015
qznc
Sep 08, 2015
Isaac Gouy
Sep 08, 2015
qznc
Sep 09, 2015
qznc
Sep 09, 2015
qznc
Sep 09, 2015
Iain Buclaw
Sep 09, 2015
qznc
Sep 09, 2015
Isaac Gouy
Sep 09, 2015
Russel Winder
Sep 09, 2015
qznc
August 29, 2015
Since issue 13487 [0] seems to rot away, I started something on my own.
Made a benchmark script and inserted C/C++/D programs for comparison.

However, various programs are broken, as you see in the example report [1].
The D code is at least 7 years old. I only fixed compile errors.
The C/C++ programs were selected quite randomly.

It should be easy to checkout the repo [2] and run the benchmarks yourself
as long as you run on Linux:

  git clone git@github.com:qznc/d-shootout.git
  cd d-shootout
  ./benchmark.d --quickly
  xdg-open index.html

Maybe somebody has already fixed or improved benchmark programs?



[0] https://issues.dlang.org/show_bug.cgi?id=13487
[1] https://qznc.github.io/d-shootout/
[2] https://github.com/qznc/d-shootout
August 29, 2015
On 29-Aug-2015 15:05, qznc wrote:
> Since issue 13487 [0] seems to rot away, I started something on my own.
> Made a benchmark script and inserted C/C++/D programs for comparison.
>
> However, various programs are broken, as you see in the example report [1].
> The D code is at least 7 years old. I only fixed compile errors.
> The C/C++ programs were selected quite randomly.
>
> It should be easy to checkout the repo [2] and run the benchmarks yourself
> as long as you run on Linux:
>
>    git clone git@github.com:qznc/d-shootout.git
>    cd d-shootout
>    ./benchmark.d --quickly
>    xdg-open index.html
>
> Maybe somebody has already fixed or improved benchmark programs?
>
Well, here is the regex-dna one with 3 versions including C-T regex:

https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d

Could be trivially parallelized with std.parallelism.

-- 
Dmitry Olshansky
August 29, 2015
On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote:
> Well, here is the regex-dna one with 3 versions including C-T regex:
>
> https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d

Thanks Dmitry!

Which version should be used?
August 29, 2015
On 29-Aug-2015 21:14, qznc wrote:
> On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote:
>> Well, here is the regex-dna one with 3 versions including C-T regex:
>>
>> https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d
>>
>
> Thanks Dmitry!
>
> Which version should be used?

I'd try all of them, I think C-T was the fastest (as it should).

-- 
Dmitry Olshansky
August 30, 2015
On Saturday, 29 August 2015 at 19:17:47 UTC, Dmitry Olshansky wrote:
> On 29-Aug-2015 21:14, qznc wrote:
>> On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote:
>>> Well, here is the regex-dna one with 3 versions including C-T regex:
>>>
>>> https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d
>>>
>>
>> Thanks Dmitry!
>>
>> Which version should be used?
>
> I'd try all of them, I think C-T was the fastest (as it should).

Yes, C-T is fastest. Even dmd is faster than C/C++ now. :)
August 30, 2015
On Saturday, 29 August 2015 at 12:05:18 UTC, qznc wrote:
> Maybe somebody has already fixed or improved benchmark programs?

As of now, most things work.

Only meteor.d is broken. Crashes at runtime.

Ldc and gdc sometimes fail, because they are behind dmd.

regexdna.cpp fails, because re2 is not available via Ubuntu apt.

Many benchmarks need some performance tuning, though. We should not lose to C/C++.
Some benchmarks are suspiciously fast, which means probably wrong.


August 30, 2015
On 30-Aug-2015 16:21, qznc wrote:
> On Saturday, 29 August 2015 at 19:17:47 UTC, Dmitry Olshansky wrote:
>> On 29-Aug-2015 21:14, qznc wrote:
>>> On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote:
>>>> Well, here is the regex-dna one with 3 versions including C-T regex:
>>>>
>>>> https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d
>>>>
>>>>
>>>
>>> Thanks Dmitry!
>>>
>>> Which version should be used?
>>
>> I'd try all of them, I think C-T was the fastest (as it should).
>
> Yes, C-T is fastest. Even dmd is faster than C/C++ now. :)

Was one of the first benchmarks where std.regex destroyed the competition. It may still do so ;)

-- 
Dmitry Olshansky
August 30, 2015
On Sunday, 30 August 2015 at 14:56:34 UTC, Dmitry Olshansky wrote:
> Was one of the first benchmarks where std.regex destroyed the competition. It may still do so ;)

Rust has compile-time regex as well now.

http://doc.rust-lang.org/regex/regex/index.html#the-regex!-macro
August 30, 2015
On 30-Aug-2015 19:57, qznc wrote:
> On Sunday, 30 August 2015 at 14:56:34 UTC, Dmitry Olshansky wrote:
>> Was one of the first benchmarks where std.regex destroyed the
>> competition. It may still do so ;)
>
> Rust has compile-time regex as well now.
>
> http://doc.rust-lang.org/regex/regex/index.html#the-regex!-macro

Yeahm I've seen that. Last year they were just catching up, they may have production quality stuff by now.


-- 
Dmitry Olshansky
September 07, 2015
On Sunday, 30 August 2015 at 13:21:42 UTC, qznc wrote:
> On Saturday, 29 August 2015 at 19:17:47 UTC, Dmitry Olshansky wrote:
>> On 29-Aug-2015 21:14, qznc wrote:
>>> On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote:
>>>> Well, here is the regex-dna one with 3 versions including C-T regex:
>>>>
>>>> https://github.com/DmitryOlshansky/FReD/blob/master/bench/regex-dna/d_dna.d
>>>>
>>>
>>> Thanks Dmitry!
>>>
>>> Which version should be used?
>>
>> I'd try all of them, I think C-T was the fastest (as it should).
>
> Yes, C-T is fastest. Even dmd is faster than C/C++ now. :)

Unfortunately, I have to take that back. C is faster than D even with compile-time regexes. I used the short running benchmarks first, where compile-time regex wins, probably because it saves some startup time. For large data, C is faster. It uses the regex engine from TCL. Maybe std.regex has just space for optimization?

I updated the benchmark results: https://qznc.github.io/d-shootout/
« First   ‹ Prev
1 2 3