2 ms·
Thanks! If you come up with an example I'd love to see it. Generally, even though `\w` in Rust's regex library supports Unicode, it shouldn't result in a slow-
by burntsushi 10y ago
Thanks! If you come up with an example I'd love to see it.
Generally, even though `\w` in Rust's regex library supports Unicode, it shouldn't result in a slow-down compared with the non-Unicode `\w`, assuming you're using find_iter. (Of course, Unicode support isn't free, but the primary cost here is memory and compile time, not matching performance.)
If you were indeed emitting `String` (a new allocation for every match) instead of `&str`, then that could certainly be a possible explanation for the slow down.