Nmap Development mailing list archives
Re: RE2 replaced PCRE(libpcre) ?
From: David Fifield <david () bamsoftware com>
Date: Thu, 4 Jun 2015 07:42:50 -0700
On Thu, Jun 04, 2015 at 06:12:23PM +0800, ryan chou wrote:
Hi All, I wonder know could the PCRE regular expressions engine replaced with the RE2 developed by Russ Cox(Google)? I have read the paper which introduced the RE2's development and the benchmark between two Engine, And the RE2's performance was better than PCRE's. (https://swtch.com/~rsc/regexp/ regexp3.html) So have any developer consider using RE2 replaced with libpcre to improve the nmap performance on parsing fingerprint? and i also wonder know why libpcre become the first choise for nmap services-fingerprint parsing? why others like boost:regex and so on?
I think the choice of regexp engine doesn't matter very much for Nmap. I think it wouldn't make sense to change it without a good reason; i.e., measurements showing that the current one really is too slow. (Keep in mind that there are maintenance costs that come with any big code change.) Back in 2009 Brandon Enright did some measurements and found a few slow patterns, but almost all of them were fast enough to be below the threshold of meaningful measurement ("timing race cars with a sundial"). http://seclists.org/nmap-dev/2009/q2/328 If you want to repeat that kind of measurement, that would be a good thing. I don't know whether we depend on any of the non-regular features of PCRE like backreferences. But such a measurement would certainly be required before deciding to change the regexp engine. _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- RE2 replaced PCRE(libpcre) ? ryan chou (Jun 04)
- Re: RE2 replaced PCRE(libpcre) ? David Fifield (Jun 04)
- Re: RE2 replaced PCRE(libpcre) ? ryan chou (Jun 04)
- Re: RE2 replaced PCRE(libpcre) ? ryan chou (Jun 04)
- Re: RE2 replaced PCRE(libpcre) ? ryan chou (Jun 04)
- Re: RE2 replaced PCRE(libpcre) ? David Fifield (Jun 04)