Closed MaxGraey closed 3 years ago
Thanks @MaxGraey - although the performance improvement is negligible.
Yes, but it could be meaningful for large data. All regexps in benchmark relatively small and simple. Will be great add something like this: https://emailregex.com
I've tried with a longer regex from the test suite - ^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$
- however it still doesn't make enough difference to feel like a worthwhile optimisation:
before: complex regex matches x 20,420 ops/sec ±0.71% (88 runs sampled)
after: complex regex matches x 20,544 ops/sec ±0.33% (94 runs sampled)
ok. Thanks for tests. Closing this due to too negligible improvement
Thanks for tests. Closing this due to too negligible improvement
no worries - worth a try!
Thanks @MaxGraey - although the performance improvement is negligible.
Before:
After: