<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Google Releasing New Open Source Regex Library</title>
	<atom:link href="http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/</link>
	<description>Podcast and blog exploring digital citizenry as a creator and a consumer.</description>
	<lastBuildDate>Tue, 15 May 2012 23:05:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>By: mkchoi</title>
		<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/comment-page-1/#comment-10030</link>
		<dc:creator>mkchoi</dc:creator>
		<pubDate>Tue, 28 Dec 2010 04:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/#comment-10030</guid>
		<description>Interestingly, I see the article.
The sites about RE2:
http://swtch.com/~rsc/regexp/regexp1.html etc

I read contents and test some, but there are questions.

See entire benchmark graph, almost RE2 is faster than PCRE.
Is there result just confirm only with matching?
Is there result about parsing data for other use?

I do some test PCRE and RE2 samples.

============PCRE============
rc = pcre_exec(
                regex,    /* compiled regular expression */
                NULL,     /* optional results from pcre_study */
                text,     /* input string */
                (int)strlen(text), /* length of input string */
                0,        /* starting position in input string */
                0,        /* OR&#039;d options */
                capturevector, /* holds results of capture groups */
                CAPTUREVECTORSIZE);
=============================

============RE2============
RE2::FullMatch(str, pat);
=============================

If test above, the result is same graph the website.

But I want parsing data, so I make following code to parsing data.
And I measure time how long these take.
The result is PCRE is faster than RE2

============PCRE============
rc = pcre_exec(
                regex,    /* compiled regular expression */
                NULL,     /* optional results from pcre_study */
                text,     /* input string */
                (int)strlen(text), /* length of input string */
                0,        /* starting position in input string */
                0,        /* OR&#039;d options */
                capturevector, /* holds results of capture groups */
                CAPTUREVECTORSIZE);

        for (j = 1; j &lt; rc; j++)
        {
            char *substring_start = text + capturevector[2*j];
            int substring_length = capturevector[2*j+1] - capturevector[2*j];
        }
=============================
============RE2============
RE2::FullMatch(str, pat2,
                     &amp;s[0], &amp;s[1], &amp;s[2], &amp;s[3], &amp;s[4],
                     &amp;s[5], &amp;s[6], &amp;s[7], &amp;s[8], &amp;s[9],
                     &amp;s[10], &amp;s[11], &amp;s[12]);
=============================

Is there some wrong code for testing?

Or website&#039;s benchmark data is only matching use?

Best Regards</description>
		<content:encoded><![CDATA[<p>Interestingly, I see the article.<br />
The sites about RE2:<br />
<a href="http://swtch.com/~rsc/regexp/regexp1.html" rel="nofollow">http://swtch.com/~rsc/regexp/regexp1.html</a> etc</p>
<p>I read contents and test some, but there are questions.</p>
<p>See entire benchmark graph, almost RE2 is faster than PCRE.<br />
Is there result just confirm only with matching?<br />
Is there result about parsing data for other use?</p>
<p>I do some test PCRE and RE2 samples.</p>
<p>============PCRE============<br />
rc = pcre_exec(<br />
                regex,    /* compiled regular expression */<br />
                NULL,     /* optional results from pcre_study */<br />
                text,     /* input string */<br />
                (int)strlen(text), /* length of input string */<br />
                0,        /* starting position in input string */<br />
                0,        /* OR&#8217;d options */<br />
                capturevector, /* holds results of capture groups */<br />
                CAPTUREVECTORSIZE);<br />
=============================</p>
<p>============RE2============<br />
RE2::FullMatch(str, pat);<br />
=============================</p>
<p>If test above, the result is same graph the website.</p>
<p>But I want parsing data, so I make following code to parsing data.<br />
And I measure time how long these take.<br />
The result is PCRE is faster than RE2</p>
<p>============PCRE============<br />
rc = pcre_exec(<br />
                regex,    /* compiled regular expression */<br />
                NULL,     /* optional results from pcre_study */<br />
                text,     /* input string */<br />
                (int)strlen(text), /* length of input string */<br />
                0,        /* starting position in input string */<br />
                0,        /* OR&#8217;d options */<br />
                capturevector, /* holds results of capture groups */<br />
                CAPTUREVECTORSIZE);</p>
<p>        for (j = 1; j &lt; rc; j++)<br />
        {<br />
            char *substring_start = text + capturevector[2*j];<br />
            int substring_length = capturevector[2*j+1] &#8211; capturevector[2*j];<br />
        }<br />
=============================<br />
============RE2============<br />
RE2::FullMatch(str, pat2,<br />
                     &amp;s[0], &amp;s[1], &amp;s[2], &amp;s[3], &amp;s[4],<br />
                     &amp;s[5], &amp;s[6], &amp;s[7], &amp;s[8], &amp;s[9],<br />
                     &amp;s[10], &amp;s[11], &amp;s[12]);<br />
=============================</p>
<p>Is there some wrong code for testing?</p>
<p>Or website&#039;s benchmark data is only matching use?</p>
<p>Best Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Gideon</title>
		<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/comment-page-1/#comment-4062</link>
		<dc:creator>Thomas Gideon</dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/#comment-4062</guid>
		<description>Had I not been so tired when writing up this post, the breathless tone would have raised a red flag.  Still, if you have some application where you don&#039;t need back references but need greater speed/scalability, I suppose it is nice to have this option.
As it stands, I retract the implication that this is a suitable replacement for even a majority of the uses to which existing implementations have been put.</description>
		<content:encoded><![CDATA[<p>Had I not been so tired when writing up this post, the breathless tone would have raised a red flag.  Still, if you have some application where you don&#8217;t need back references but need greater speed/scalability, I suppose it is nice to have this option.<br />
As it stands, I retract the implication that this is a suitable replacement for even a majority of the uses to which existing implementations have been put.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Gideon</title>
		<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/comment-page-1/#comment-4061</link>
		<dc:creator>Thomas Gideon</dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/#comment-4061</guid>
		<description>Thanks for the catch, Philip.  I&#039;ve updated the post to reflect this caveat.  I should have realized there was more to the story and dug into it further.</description>
		<content:encoded><![CDATA[<p>Thanks for the catch, Philip.  I&#8217;ve updated the post to reflect this caveat.  I should have realized there was more to the story and dug into it further.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claes Wallin</title>
		<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/comment-page-1/#comment-4060</link>
		<dc:creator>Claes Wallin</dc:creator>
		<pubDate>Fri, 12 Mar 2010 09:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/#comment-4060</guid>
		<description>A regular expression library that only supports actual regular expressions?The days of wonder have not come to an end!</description>
		<content:encoded><![CDATA[<p>A regular expression library that only supports actual regular expressions?The days of wonder have not come to an end!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Durbin</title>
		<link>http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/comment-page-1/#comment-4059</link>
		<dc:creator>Philip Durbin</dc:creator>
		<pubDate>Fri, 12 Mar 2010 03:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://thecommandline.net/2010/03/11/google-releasing-new-open-source-regex-library/#comment-4059</guid>
		<description>&quot;RE2 drops support for backreferences and generalized zero-width assertions, because they cannot be implemented efficiently&quot; according to http://code.google.com/p/re2 and backreferences are all grayed out as not supported by RE2 on http://code.google.com/p/re2/wiki/Syntax .  Will RE2 spread far and wide?  Well. . . do you want backreferences?

In his paper &lt;a href=&quot;http://swtch.com/~rsc/regexp/regexp1.html&quot; rel=&quot;nofollow&quot;&gt;Regular Expression Matching Can Be Simple And Fast&lt;/a&gt;, Russ Cox, the Google engineer who also authored the press release, says, &quot;Some might argue that this test is unfair to the backtracking implementations, since it focuses on an uncommon corner case. This argument misses the point: given a choice between an implementation with a predictable, consistent, fast running time on all inputs or one that usually runs quickly but can take years of CPU time (or more) on some inputs, the decision should be easy.&quot;

I guess so. . . it really comes down to features versus performance.</description>
		<content:encoded><![CDATA[<p>&#8220;RE2 drops support for backreferences and generalized zero-width assertions, because they cannot be implemented efficiently&#8221; according to <a href="http://code.google.com/p/re2" rel="nofollow">http://code.google.com/p/re2</a> and backreferences are all grayed out as not supported by RE2 on <a href="http://code.google.com/p/re2/wiki/Syntax" rel="nofollow">http://code.google.com/p/re2/wiki/Syntax</a> .  Will RE2 spread far and wide?  Well. . . do you want backreferences?</p>
<p>In his paper <a href="http://swtch.com/~rsc/regexp/regexp1.html" rel="nofollow">Regular Expression Matching Can Be Simple And Fast</a>, Russ Cox, the Google engineer who also authored the press release, says, &#8220;Some might argue that this test is unfair to the backtracking implementations, since it focuses on an uncommon corner case. This argument misses the point: given a choice between an implementation with a predictable, consistent, fast running time on all inputs or one that usually runs quickly but can take years of CPU time (or more) on some inputs, the decision should be easy.&#8221;</p>
<p>I guess so. . . it really comes down to features versus performance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

