This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch, PR 61061] Add state limit for regex NFA
- From: Tim Shen <timshen91 at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 28 Jun 2014 09:56:40 -0700
- Subject: Re: [Patch, PR 61061] Add state limit for regex NFA
- Authentication-results: sourceware.org; auth=none
- References: <CAPrifDkixkdXADF-_eG9rp0vhGwS+NKCTmCvruwXR4A5k5z=kA at mail dot gmail dot com> <53AD1F4A dot 9030100 at oracle dot com> <CAPrifDmVnOjwpt2R7bHE-MOVSHuH_zcYXR5GZ9V3+t-3GuHLow at mail dot gmail dot com> <20140628094805 dot GP2711 at redhat dot com>
On Sat, Jun 28, 2014 at 2:48 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> I wonder if it would be better to use a sorted
> vector<pair<_StateIdT,_StateIdT>> instead of a map, for improved
> memory footprint and runtime speed, but that can be changed later.
In this case, we keep inserting (__m[__u] = __id) and looking up
(__m.count()) the container in a crossover order, which required a map
to minimize both's complexity.
--
Regards,
Tim Shen