January 05, 2016 Re: Regex benchmarks in Rust, Scala, D and F# | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Messenger | On Tuesday, 5 January 2016 at 23:24:24 UTC, Messenger wrote:
> On Tuesday, 5 January 2016 at 20:04:35 UTC, rsw0x wrote:
>>[...]
>
> Anyone on linux who could imgur a callgraph please? Premature optimisation and all that.
nearly all the time is spent inside the regex itself and filtering out empty results, moving the file to /tmp(ramdisk) does nothing for performance
with the way the problem is structured I'm not sure how it could be changed beyond some micro-optimizations, as you can't use matchAll afaict because the benchmark requires it to be line-by-line
well, you probably could
I just don't feel like coding it because I hate regex
| |||
January 06, 2016 Re: Regex benchmarks in Rust, Scala, D and F# | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Karthikeyan | On Tuesday, 5 January 2016 at 17:52:39 UTC, Karthikeyan wrote:
> Hi,
>
> Came across this post in rust-lang subreddit about the regex benchamrks. Scala surprisingly outperforms D. LDC also gives a good advantage for efficiency of D.
>
> http://vaskir.blogspot.ru/2015/09/regular-expressions-rust-vs-f.html
I think the problem with these "benchmarks" is that when their favorite language is up there and not doing as good as the others, people begin to yell out that they didnt optimize the code well, either through compiler flags or something else.
There should be a public benchmark standard.
No special functions. No special linker flags. Just the plain code and compilation process.
| |||
January 06, 2016 Re: Regex benchmarks in Rust, Scala, D and F# | ||||
|---|---|---|---|---|
| ||||
Posted in reply to israel | On Wednesday, 6 January 2016 at 07:05:43 UTC, israel wrote:
> On Tuesday, 5 January 2016 at 17:52:39 UTC, Karthikeyan wrote:
>> Hi,
>>
>> Came across this post in rust-lang subreddit about the regex benchamrks. Scala surprisingly outperforms D. LDC also gives a good advantage for efficiency of D.
>>
>> http://vaskir.blogspot.ru/2015/09/regular-expressions-rust-vs-f.html
>
> I think the problem with these "benchmarks" is that when their favorite language is up there and not doing as good as the others, people begin to yell out that they didnt optimize the code well, either through compiler flags or something else.
>
> There should be a public benchmark standard.
>
> No special functions. No special linker flags. Just the plain code and compilation process.
That'll never work though.
'Just the plain code' to me isn't 'just the plain code' to you.
Ideally, a Git repo somewhere with a lot of benchmarks that the community can edit and make better. Over time (assuming the repo becomes somewhat popular) all benchmarking programs will use each language to it's fullest - thus giving accurate, comparable results across the board.
| |||
January 06, 2016 Re: Regex benchmarks in Rust, Scala, D and F# | ||||
|---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Tuesday, 5 January 2016 at 18:09:54 UTC, deadalnix wrote:
> On Tuesday, 5 January 2016 at 17:52:39 UTC, Karthikeyan wrote:
>> Hi,
>>
>> Came across this post in rust-lang subreddit about the regex benchamrks. Scala surprisingly outperforms D. LDC also gives a good advantage for efficiency of D.
>>
>> http://vaskir.blogspot.ru/2015/09/regular-expressions-rust-vs-f.html
>
> I'm willing to bet the bad result D has come from the use of DMD.
>
> Honestly, pushing DMD as the reference implementation cost us quite a lot on the PR side of things. D appears to be slower that it really is.
not at all:
D(LDC): 5.778s
D(GDC): 5.612s
D(DMD): 5.267s
scalac: 5.748s
rustc: 9.287s
so DMD is the fastest
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply