Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Filter] Performance increases. #2509
The majority of the time difference without the cache was the generator expression which created the pattern.
Adding a pattern cache makes the regex solution multiple orders of magnitude faster on any message other than the first received in a channel with a filter.
(Side by side comparison from discord conversation, running the same above tests on the updated version, but in a profiler instead of just a straight time count.)