September 07, 2015
On 07-Sep-2015 11:29, qznc wrote:
> Maybe std.regex has just space for optimization?

Sure thing, see WIP here (~25% faster but not yet complete):
https://github.com/D-Programming-Language/phobos/pull/3314

-- 
Dmitry Olshansky
September 07, 2015
On Monday, 7 September 2015 at 08:33:33 UTC, Dmitry Olshansky wrote:
> On 07-Sep-2015 11:29, qznc wrote:
>> Maybe std.regex has just space for optimization?
>
> Sure thing, see WIP here (~25% faster but not yet complete):
> https://github.com/D-Programming-Language/phobos/pull/3314

Could anybody add C# version of examples?
September 08, 2015
Why not go really big. aka:

http://forum.dlang.org/post/vzcvwrbqpeamtnopmtoa@forum.dlang.org
September 08, 2015
On Tuesday, 8 September 2015 at 08:24:43 UTC, Robert burner Schadek wrote:
> Why not go really big. aka:
>
> http://forum.dlang.org/post/vzcvwrbqpeamtnopmtoa@forum.dlang.org

You suggest to create a benchmark suite from all the unittests in Phobos?

I don't think this is a good idea. Most programs don't make good performance tests. Even the Benchmarks Game / Shootout benchmarks are partially stupid. For example, threadring measures context switching. The best strategy is "use pthreads and pthread mutex and restrict to one core". It only shows how good your language can access the pthread API. The context switching is done by Linux. The pidigits programs basically measures libGMP performance.

I'm all for adding more programs into the benchmark suite, but they should be carefully selected to measure different aspects. I don't understand all the programs enough to know what is lacking. Probably some memory management aspects. Maybe some concurrency stuff.
September 08, 2015
On Tuesday, 8 September 2015 at 09:27:13 UTC, qznc wrote:
> On Tuesday, 8 September 2015 at 08:24:43 UTC, Robert burner Schadek wrote:
>> Why not go really big. aka:
>>
>> http://forum.dlang.org/post/vzcvwrbqpeamtnopmtoa@forum.dlang.org
>
> You suggest to create a benchmark suite from all the unittests in Phobos?
>
> I don't think this is a good idea. Most programs don't make good performance tests.

Read your PR more closely now. We already agree on that. :P

Still a difference: You propose a method to measure Phobos performance and detect regressions. My shootout wants to compare D and C/C++ performance.


September 08, 2015
On Saturday, 29 August 2015 at 12:05:18 UTC, qznc wrote:

> I started something on my own.

Kudos to qznc!


> The C/C++ programs were selected quite randomly.

Note: There are separate C and C++ programs shown on the benchmarks game -- so for something like regex-dna there's a C program using the C library written for Tcl and there's a C++ program using the re library.

fwiw Doing both would make your comparison a little broader.
September 08, 2015
On Tuesday, 8 September 2015 at 09:27:13 UTC, qznc wrote:

> For example, threadring measures context switching.

thread-ring has aged badly. It was added when the measurements were only made on single-core hardware, and Erlang's huge number of lightweight processes seemed interesting ;-)

It's been many years since the thread-ring measurements were included in the summary charts.


> The pidigits programs basically measures libGMP performance.

And arbitrary precision arithmetic without libGMP :-)
September 08, 2015
On Tuesday, 8 September 2015 at 18:53:02 UTC, Isaac Gouy wrote:
> On Tuesday, 8 September 2015 at 09:27:13 UTC, qznc wrote:
>
>> For example, threadring measures context switching.
>
> thread-ring has aged badly. It was added when the measurements were only made on single-core hardware, and Erlang's huge number of lightweight processes seemed interesting ;-)
>
> It's been many years since the thread-ring measurements were included in the summary charts.

It is interesting that Erlang and others are considered "preemptive" threads. Afaik the Erlang runtime does not interrupt processes.

>> The pidigits programs basically measures libGMP performance.
>
> And arbitrary precision arithmetic without libGMP :-)

In this comparison it is actually interesting, because D has its own bignum implementation in the standard library. It holds well against libGMP.
September 08, 2015
On Tuesday, 8 September 2015 at 18:41:10 UTC, Isaac Gouy wrote:
> On Saturday, 29 August 2015 at 12:05:18 UTC, qznc wrote:
>
>> I started something on my own.
>
> Kudos to qznc!
>
>
>> The C/C++ programs were selected quite randomly.
>
> Note: There are separate C and C++ programs shown on the benchmarks game -- so for something like regex-dna there's a C program using the C library written for Tcl and there's a C++ program using the re library.
>
> fwiw Doing both would make your comparison a little broader.

Yes. I'm not sure how to structure this whole suite. The general goal is "D claims that it can match C/C++ in performance, let's have some actual numbers". So far D mostly disappoints in terms of performance.

There are at least three interesting variations "fastest parallel programs", "fastest sequential programs" and "short idiomatic programs". Probably all of them should be compared.
September 08, 2015
On Tuesday, 8 September 2015 at 21:11:15 UTC, qznc wrote:
> Yes. I'm not sure how to structure this whole suite. The general goal is "D claims that it can match C/C++ in performance, let's have some actual numbers". So far D mostly disappoints in terms of performance.

The most interesting thing to test is how they fare with high level optimization, not low level optimization. So make sure the implementation is similar...