Is there any difference between original re2 and re2J

516 views
Skip to first unread message

Amish Asthana

unread,
Apr 13, 2015, 3:30:59 PM4/13/15
to re2j-d...@googlegroups.com
Hi
We are planning to use re2 for Java.
One can see two option :
a) Use re2J ( Download using Maven)
b) On the net one also see : https://github.com/logentries/re2-java , which from what we can see provide Java wrapper by calling inherent libs. C++ libs of RE2.

So a question  if they are same, functionality wise and performance wise. Or does re2-java provide more functionality which re2J does not provide.
regards and thanks
amish

Alan Donovan

unread,
Apr 13, 2015, 5:15:01 PM4/13/15
to Amish Asthana, re2j-d...@googlegroups.com
They are not the same.

The wrapper around the C++ implementation has both DFA and NFA matching engines and many optimizations, and its interface is byte-oriented.  It may be faster for many inputs, though you'd have to measure it.  It has a native code dependency.

The Java implementation has only an NFA matcher, and is rune- (Unicode code point) oriented, so it cannot support \C.  It does not require native code.

Amish Asthana

unread,
Apr 13, 2015, 5:41:52 PM4/13/15
to re2j-d...@googlegroups.com, aast...@ciphercloud.com
Thanks a lot Alan, appreciate it.
regards and thanks
amish
Reply all
Reply to author
Forward
0 new messages