This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Regex bracket matcher cache optimization
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Tim Shen <timshen91 at gmail 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: Wed, 8 Jan 2014 09:24:12 +0000
- Subject: Re: [Patch] Regex bracket matcher cache optimization
- Authentication-results: sourceware.org; auth=none
- References: <CAPrifDnXTpH6K2A6O41OOx34AVMKKm=-gXPh7J0Sjq9=9rM8+g at mail dot gmail dot com> <CAPrifDkC0iSROtATApvp4_h9Je1S7XcahUBnOzK9g4ZdgYsBEg at mail dot gmail dot com> <52CBC2C1 dot 6060908 at oracle dot com> <CAPrifDkATveVCsq0RFn-6VadkOgEjOiKV-LYWGgy5tZg0MxSyA at mail dot gmail dot com>
On 7 January 2014 19:36, Tim Shen wrote:
>
> I didn't noticed that's so time consuming. I think reducing the
> compile time is possible (by templating several member functions
> instead of whole _Compiler<> class).
Ouch! Yes, that's quite a bit slower, and this code is already very
slow to compile.
I haven't looked at the code recently, but another option that
sometimes helps is to have a base class that implements the common
functionality and then derive four classes from it, but minimise the
amount of code in the derived classes.
Thanks for the patches!