Google’s new RE en­gine

I stumbled over Google’s new RE en­gine. Un­for­tu­nately it is not hand­ling back­refer­ences, so it is not a drop-​in re­place­ment for the reg­u­lar ex­pres­sions code in FreeBSD. It has a POSIX mode, but this only seems to be enough for the egrep syn­tax. For people which need back­refer­ences, they refer to the Google Chrome’s RE en­gine ir­reg­exp which in turn ref­er­ences a pa­per from 2007 which is titled Reg­u­lar Ex­pres­sion Match­ing Can Be Simple And Fast.

The tech­niques in the pa­per can not be ap­plied to the ir­reg­exp en­gine, but maybe could help to speed up awk, egrep and sim­il­ar pro­grams.

I think it would be in­ter­est­ing to com­pare those re­cent de­vel­op­ments to what we have in FreeBSD, and if they are faster, to see if it is pos­sible to im­prove the FreeBSD im­ple­ment­a­tion based upon them (either by writ­ing new code, or by im­port­ing ex­ist­ing code, de­pend­ing on the cor­res­pond­ing li­cense and the lan­guage the code is writ­ten in).

Maybe a can­did­ate for the GSoC?

5 thoughts on “Google’s new RE en­gine”

  1. I think for libc TRE is the way to go. But still, PCRE is a good can­did­ate for base sys­tem so that tools, like grep can have Perl-​syntax sup­port, as well. And this work could serve to re­view TRE al­gorithms and maybe im­prove them. TRE is also BSD-​licensed and very well doc­u­mented in the author’s MSc thes­is.

    1. Or I do not do this and have a look if someone is read­ing the FreeBSD blogs. Some kind of ex­per­i­ment to see if people in­ter­ested in the GSoC look fur­ther in­to FreeBSD than just fol­low­ing the link from Google to the FreeBSD ideas page.

Leave a Reply

Your email address will not be published. Required fields are marked *