4 ms·
> I highly doubt your home-grown pattern matching functions could beat the decades of optimization that have gone into RegEx engines On the contrary, the All()
by Merad 4y ago
> I highly doubt your home-grown pattern matching functions could beat the decades of optimization that have gone into RegEx engines
On the contrary, the All() method used here (which is part of the .Net standard library) is literally just a loop that evaluates each item in the collection to verify that they all match the predicate function. It'll be able to check hundreds if not thousands of characters in the time that it takes the regex engine to initialize and parse the pattern.
- ttfkam 4y agoIt other words, you're not caching/reusing you regex patterns? I think I see the cause of one of your recurring performance problems.
- RadiozRadioz 4y agoInteresting how you conveniently ignored the second half of my sentence. I will paste it here: > in anything but the most trivial of patterns (like the one demonstrated here)