On Friday, 21 July 2017 at 13:25:32 UTC, Adrian Matoga wrote:
On Friday, 14 July 2017 at 13:29:30 UTC, Joakim wrote:
Yes, D's compile-time regex are still the fastest in the world.
I've been benching it recently for a marketing-oriented blog
post I'm preparing for the official D blog, std.regex beats
out the top C and Rust entries from the benchmarks game on
linux/x64 with a single core:
http://benchmarksgame.alioth.debian.org/u64q/regexredux.html
https://github.com/joakim-noah/regex-bench
D comes in third on Android/ARM, but not far behind,
suggesting it would still be third on that list if run with a
bunch of other languages on mobile. Dmitry thinks it might be
alignment issues, the bane of cross-platform, high-performance
code on ARM, as he hasn't optimized his regex code for ARM.
Interesting. A few months ago I wanted to sell ctRegex as the
fastest one in a presentation, but in my benchmarks (based on
[1]) I found it to be of equal speed or slower than
boost::regex (LDC vs Clang).
I've got to take a look at your benchmarks, and repeat mine to
check again if I didn't mess something up.
[1] http://lh3lh3.users.sourceforge.net/reb.shtml
The boost C++ benchmark run in the link I gave says it's more
than 10X slower than the top C one I found D to be faster than,
so I didn't bother with it. Maybe you can speed it up:
http://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexredux&lang=gpp&id=3
As for your benchmark, I'd be surprised if ctRegex wouldn't beat
out Boost given how well it does against the faster PCRE in the
fasta-dna one I tried, but all these microbenchmarks only look at
particular features of a full regex engine, so it's always
possible ctRegex is slower in others.