Regex benchmarks in Rust, Scala, D and F#
rsw0x via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 5 12:04:35 PST 2016
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
k, I optimized it for fun
https://paste.ee/p/Bb1Ns
I also found an mmfile bug if someone could report it for me, if
I don't add a root to the mmfile contents(or disable the GC) the
program will crash
ctregex for both
his:
Elapsed: 6432
mine:
Elapsed: 3123
ldc -O3 -release -boundscheck=off -singleobj regex.d
does not compile with the latest gdc on arch linux(no
lineSplitter)
you could probably get it faster by reusing a buffer(I forget
which call this is, but it exists in phobos) when reading the
file but I felt like using mmfile as I've never used it before.
Make sure you use a block-size buffer(e.g, 4096)
Bye.
More information about the Digitalmars-d
mailing list