www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Towards better regex - rewind-regex

reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
So some of you may have heard about
rewind regex, a new radical effort to rebuild and redesign 
std.regex.

I’m collecting feedback, in particular what feature you may want 
to sacrifice in the name of performance.

https://github.com/DmitryOlshansky/rewind-regex

—
Dmitry Olshansky
CEO at Glow labs
https://sponsr.ru/glow
https://patreon.com/dmitry_glow_labs
Jun 24 2023
next sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On Saturday, 24 June 2023 at 19:22:26 UTC, Dmitry Olshansky wrote:
 So some of you may have heard about
 rewind regex, a new radical effort to rebuild and redesign 
 std.regex.

 I’m collecting feedback, in particular what feature you may 
 want to sacrifice in the name of performance.
I’ll start - back references, lookaround, zero-width assertions.
 https://github.com/DmitryOlshansky/rewind-regex

 —
 Dmitry Olshansky
 CEO at Glow labs
 https://sponsr.ru/glow
 https://patreon.com/dmitry_glow_labs
Jun 24 2023
prev sibling next sibling parent reply Chris Katko <ckatko gmail.com> writes:
On Saturday, 24 June 2023 at 19:22:26 UTC, Dmitry Olshansky wrote:
 So some of you may have heard about
 rewind regex, a new radical effort to rebuild and redesign 
 std.regex.

 I’m collecting feedback, in particular what feature you may 
 want to sacrifice in the name of performance.

 https://github.com/DmitryOlshansky/rewind-regex

 —
 Dmitry Olshansky
 CEO at Glow labs
 https://sponsr.ru/glow
 https://patreon.com/dmitry_glow_labs
I just want to say, I really appreciate this work. std.regex was always one of my sore spots because on my netbook it would noticeably implode the compiling time and RAM usage.
Jun 24 2023
parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On Saturday, 24 June 2023 at 22:51:20 UTC, Chris Katko wrote:
 On Saturday, 24 June 2023 at 19:22:26 UTC, Dmitry Olshansky 
 wrote:
 So some of you may have heard about
 rewind regex, a new radical effort to rebuild and redesign 
 std.regex.

 I’m collecting feedback, in particular what feature you may 
 want to sacrifice in the name of performance.

 https://github.com/DmitryOlshansky/rewind-regex

 —
 Dmitry Olshansky
 CEO at Glow labs
 https://sponsr.ru/glow
 https://patreon.com/dmitry_glow_labs
I just want to say, I really appreciate this work. std.regex was always one of my sore spots because on my netbook it would noticeably implode the compiling time and RAM usage.
It saddens me greatly to hear about that, suffice it to say new regex doesn’t use templates at all. — Dmitry Olshansky CEO at Glow Labs https://sponsr.ru/glow https://patreon.com/dmitry_glow_labs
Jun 24 2023
parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 25/06/2023 1:54 PM, Dmitry Olshansky wrote:
 It saddens me greatly to hear about that, suffice it to say new regex 
 doesn’t use templates at all.
Templates weren't the issue. You want to be very careful with the std.uni tables, don't initialize them at CTFE unless you can help it. This is what my big bad PR for std.regex that was merged recently prevented. A whopping 500ms. Either way, its fixed now thanks to time trace!
Jun 25 2023
prev sibling parent reply Sergey <kornburn yandex.ru> writes:
On Saturday, 24 June 2023 at 19:22:26 UTC, Dmitry Olshansky wrote:
 So some of you may have heard about
 rewind regex, a new radical effort to rebuild and redesign 
 std.regex.

 I’m collecting feedback, in particular what feature you may 
 want to sacrifice in the name of performance.

 https://github.com/DmitryOlshansky/rewind-regex

 —
 Dmitry Olshansky
 CEO at Glow labs
 https://sponsr.ru/glow
 https://patreon.com/dmitry_glow_labs
Comparable with performance in this bench https://github.com/rust-lang/regex/tree/master/bench :) Recently they "remove D and C++ regex engines Neither of them were particularly competitive" So will be cool to get back in the race :)
Jun 25 2023
parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On Sunday, 25 June 2023 at 12:06:10 UTC, Sergey wrote:
 On Saturday, 24 June 2023 at 19:22:26 UTC, Dmitry Olshansky 
 wrote:
 So some of you may have heard about
 rewind regex, a new radical effort to rebuild and redesign 
 std.regex.

 I’m collecting feedback, in particular what feature you may 
 want to sacrifice in the name of performance.

 https://github.com/DmitryOlshansky/rewind-regex

 —
 Dmitry Olshansky
 CEO at Glow labs
 https://sponsr.ru/glow
 https://patreon.com/dmitry_glow_labs
Comparable with performance in this bench https://github.com/rust-lang/regex/tree/master/bench :) Recently they "remove D and C++ regex engines Neither of them were particularly competitive" So will be cool to get back in the race :)
Full force:)
Jun 26 2023