<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx</link><description>I often get questions about Regex and what the RegexOptions.Compiled flag actually does. There are in fact three different modes that Regex can work in: interpreted (without the compiled flag), compiled on the fly (with the compiled flag), and precompiled</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Advanced Regular Expressions in C# | Martijn's C# Programming Blog</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#9471251</link><pubDate>Thu, 12 Mar 2009 05:18:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471251</guid><dc:creator>Advanced Regular Expressions in C# | Martijn's C# Programming Blog</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.dijksterhuis.org/regular-expressions-advanced/"&gt;http://www.dijksterhuis.org/regular-expressions-advanced/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9471251" width="1" height="1"&gt;</description></item><item><title>To Compile or Not To Compile</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#384880</link><pubDate>Fri, 04 Mar 2005 08:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:384880</guid><dc:creator>Coding Horror</dc:creator><description> I am currently in the middle of a way-overdue refactoring of MhtBuilder, which uses regular expressions extensively. I noticed that I had sort of mindlessly added the RegexOptions.Compiled all over the place. It says &amp;quot;compiled&amp;quot; so it must be...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=384880" width="1" height="1"&gt;</description></item><item><title>re: Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#268727</link><pubDate>Wed, 24 Nov 2004 00:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:268727</guid><dc:creator>David Gutierrez</dc:creator><description>Lexp, you're right that Whidbey can't unload assemblies.  What we've done is switch the compiled on the fly case to use a new form of Reflection.Emit called lightweight code-gen.  Rather than generating assemblies, modules, types and methods, with lightweight code-gen you are only allowed to generate methods.  In the end you receive a delegate to the generated method, and when that delegate is GC'ed, all of the IL and the JIT'ed code is reclaimed.   &lt;br&gt;&lt;br&gt;Note that the precompiled case can't use lightweight code-gen, so you still can't unload those types.  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=268727" width="1" height="1"&gt;</description></item><item><title>re: Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#258825</link><pubDate>Wed, 17 Nov 2004 16:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:258825</guid><dc:creator>lexp</dc:creator><description>&amp;gt; In addition. in v1.0 and v1.1, we couldn't ever free the IL we generated, meaning you leaked memory by using this mode.  We've fixed that problem in Whidbey.&lt;br&gt;&lt;br&gt;As far as I know, Whidbey does not support unloading assemblies. Do you create AppDomain for each compiled Regex (and get all cross-appdomain performance drop) or you use some sort of internal mechanism for unloading assemblies?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=258825" width="1" height="1"&gt;</description></item><item><title>re: Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#257693</link><pubDate>Mon, 15 Nov 2004 21:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:257693</guid><dc:creator>David Gutierrez</dc:creator><description>We explored doing something like what Doug mentioned as a general purpose mechanism, though it didn't end up happening in Whidbey.  I'll enter a feature request to make precompiling easier somehow, though.  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=257693" width="1" height="1"&gt;</description></item><item><title>re: Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#256917</link><pubDate>Sat, 13 Nov 2004 11:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:256917</guid><dc:creator>RichB</dc:creator><description>The Whidbey C++ project system can manage and link multiple files from multiple languages (eg C++. VB.Net and C# all in the same project). Is it possible to add a .regex filetype into the C++ project system which will also compile and link into a single assembly?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=256917" width="1" height="1"&gt;</description></item><item><title>re: Regular Expression performance [David Gutierrez]</title><link>http://blogs.msdn.com/b/bclteam/archive/2004/11/12/256783.aspx#256890</link><pubDate>Sat, 13 Nov 2004 08:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:256890</guid><dc:creator>Doug McClean</dc:creator><description>It would be really awesome if the C# compiler or IDE could do that for you, possibly by allowing a special file type and letting Regex.CompileToAssembly() or a more granular method like a hypothetical Regex.CompileToModule() have a crack at it. This approach could be extended to other DSLs too. I wonder if with the new extensible build engine it might not be possible to create such a tool as an add-in. Hmm...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=256890" width="1" height="1"&gt;</description></item></channel></rss>