BrandGhost
OVER 800x IMPROVEMENT?! Benchmarking Regular Expressions in C#

OVER 800x IMPROVEMENT?! Benchmarking Regular Expressions in C#

If you check out these benchmarks, you'll see a scenario that you might be doing in your very own code and you could be getting an 800x performance boost. And if you think there's no way you have a Regex in C# that will speed up by 800x, then you might see another benchmark where you could get a 100x gain! In this video, I walk through the various ways that you can construct a regular expression in C# and the different performance characteristics of each. While this isn't an exhaustive benchmarking collection over a wide variety of C# regexes, hopefully, this serves as some inspiration to benchmark your code! PLEASE NOTE: There is a critical flaw in the benchmark code as pointed out by a viewer (and THANK YOU for doing so in a very constructive and helpful way). You can read about the correction here: https://www.devleader.ca/2024/04/12/csharp-regular-expression-benchmarks-how-to-avoid-my-mistakes/
An error has occurred. This application may no longer respond until reloaded. Reload