Re: [Boost-bugs] [Boost C++ Libraries] #5215: regex_match is giving a performance hit.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5215: regex_match is giving a performance hit.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-01 09:32:47


#5215: regex_match is giving a performance hit.
---------------------------------+------------------------------------------
  Reporter: arjun_m@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: regex
   Version: Boost 1.46.0 | Severity: Optimization
Resolution: | Keywords:
---------------------------------+------------------------------------------

Comment (by anonymous):

 Replying to [comment:2 anonymous]:
> Can you please provide some example code that illustrates the problem?
>
> Please also bare in mind that matching a regular expression is in the
 general case NP-complete. Assuming it doesn't change the semantics of
 your program then something like:
>
> {{{/Volumes/[^/]*/Backups.backupdb/.*}}}
>
> Should be more efficient. Otherwise try something like:
>
> {{{/Volumes(?:/[^/]*)+?/Backups.backupdb/.*}}}



 Thanks for the reply.

 After I posted this issue, I was trying out different alternatives and
 found something.
 The back drop for this issue is that,
 I am getting exclusion list from the User, based on which I am performing
 some operations. So I convert the exclusion list to an 'expression' and
 pass it to regex_match().
 The more I add exclusion's , more time is taken by regex_match(). As
 suggested by I would provide an example code that would illustrate the
 problem.

 Thanks.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5215#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC