This is the mail archive of the
mailing list for the GCC project.
Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Tim Shen <timshen91 at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Apr 2014 18:00:39 +0100
- Subject: Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS
- Authentication-results: sourceware.org; auth=none
- References: <20140428165121 dot GB928 at redhat dot com> <CAPrifDnRhfm2pCDAN5fRs81g8m45u8Kt40n8NHXLmGJrh8aiOA at mail dot gmail dot com> <20140428191027 dot GD928 at redhat dot com> <CAPrifDnTP8CzJtvZ2kYLXt7+=bij9kHj7acArkHGst_MUsw4sw at mail dot gmail dot com> <20140428192950 dot GE928 at redhat dot com> <CAPrifDnLBbCzADcHZrMqFhQnbLUDLjq2Hv_EGoUqLeOXmoep0Q at mail dot gmail dot com> <20140428201853 dot GG928 at redhat dot com> <CAPrifD=fvO0+ha+t7pd48VDht-uzsbBVuaeSEtR1Q6z4jnNQXA at mail dot gmail dot com> <20140429101736 dot GH928 at redhat dot com> <CAPrifD=Jv5z4ju4TBzwonJ9=i3yqRxHcVuZsWMPdnqWWnp8JAQ at mail dot gmail dot com>
On 29/04/14 12:54 -0400, Tim Shen wrote:
On Tue, Apr 29, 2014 at 6:17 AM, Jonathan Wakely <email@example.com> wrote:
This runs much faster on trunk than with 4.9.0, so we might want to
backport your recent patches to the gcc-4_9-branch.
It's faster but nothing to do with optimization. It's because my first
patch set the DFS approach by default, which is faster in common case
but has bad worst case performance. Try your testcase and
with/without defining _GLIBCXX_REGEX_USE_THOMPSON_NFA in the trunk
Ah yes, of course ... but that's still a nice improvement for people
using a regex with no back references (at least for the common cases).