Re2 Performance

213 views
Skip to first unread message

Saiadithya Cumbulam Thangaraj

unread,
Sep 5, 2016, 1:00:34 PM9/5/16
to re2-dev
Hey Paul,
 
   Hope you are doing well. I need your suggestion for this:

Yesterday I was comparing Tcl regular expression and google Re2 regular expression performance. It seems that I found Tcl regular expression more faster than Re2 in some of the situations.

In case if you are not aware of Tcl and its regular expressions, here you go:https://en.wikibooks.org/wiki/Tcl_Programming/regexp

In which way Re2 is more faster or in which situations you think Re2 should be used to make applications more faster. 

Andrew Gallant

unread,
Sep 5, 2016, 1:23:56 PM9/5/16
to re2-dev
Which regular expressions did you try? On what input?

Paul Wankadia

unread,
Sep 6, 2016, 12:57:36 AM9/6/16
to Saiadithya Cumbulam Thangaraj, re2-dev
On Tue, Sep 6, 2016 at 3:00 AM, Saiadithya Cumbulam Thangaraj <pn4...@umbc.edu> wrote:

Yesterday I was comparing Tcl regular expression and google Re2 regular expression performance. It seems that I found Tcl regular expression more faster than Re2 in some of the situations.

To echo Andrew's questions, what were the regular expressions and the input strings? Please be specific.

In case if you are not aware of Tcl and its regular expressions, here you go:https://en.wikibooks.org/wiki/Tcl_Programming/regexp

In which way Re2 is more faster or in which situations you think Re2 should be used to make applications more faster. 

If performance matters, then you should explicitly construct the RE2 object before matching any input strings. Please refer to https://github.com/google/re2/blob/master/re2/re2.h#L100-L114 for details and an example. This is particularly relevant for benchmarking.

Reply all
Reply to author
Forward
0 new messages