Big Chungus
Fast regex that takes in a span instead of a string
I'm trying to port a lexer I wrote in c++ to c# and want to get the same functionality as RE2's consume method, however it seems like all the c# wrappers for RE2 don't even support using
ReadOnlySpan<char>
instead of strings as input, which seems like it would be ludicrously slow when ran repeatedly compared to using a ReadOnlySpan<char>
(or equivalent to c++'s string_view
). Is there a way around this or am I forced to suffer through slow code?42 replies