For any specific performance question like this, the best way to find out which way is faster is to test both and see.
In general, compiling a regex is unlikely to have much benefit unless you’re using the regex a lot, or on very large strings. (Or both.) I think it’s more of an optimization to try after you’ve determined that you have a performance problem and you think this might help, than one to try randomly.
For some general discussion on the drawbacks of RegexOptions.Compiled, see this blog post by Jeff Atwood; it’s very old (from the days of .NET Framework 1.1), but from what I understand, none of the major relevant facts have changed since it was written.
- Original blog link: https://blog.codinghorror.com/to-compile-or-not-to-compile/
- Wayback Machine link (in case original link expires): https://web.archive.org/web/20140411223755/https://blog.codinghorror.com/to-compile-or-not-to-compile/
- Original blog article heavily quotes this MSDN blog article: https://web.archive.org/web/20140413160809/http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx