This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS
- From: Tim Shen <timshen91 at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Apr 2014 15:24:36 -0400
- Subject: Re: [patch 3/N] std::regex refactoring - _Executor DFS / BFS
- Authentication-results: sourceware.org; auth=none
- References: <20140428124003 dot GW928 at redhat dot com> <20140428144659 dot GY928 at redhat dot com> <CAPrifD=Bc4D63KJONG5d7YzX1t73HDm276AKPY5mEOZi942_EA at mail dot gmail dot com> <20140428165121 dot GB928 at redhat dot com> <CAPrifDnRhfm2pCDAN5fRs81g8m45u8Kt40n8NHXLmGJrh8aiOA at mail dot gmail dot com> <20140428191027 dot GD928 at redhat dot com>
On Mon, Apr 28, 2014 at 3:10 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
> Data members are accessed through the 'this' pointer, which can
> require an indirection and be harder to optimise than a function
> parameter.
It doesn't matter if this variable is not frequently checked. But
let's just use the function parameter and expecting compiler's
optimization.
> My concern is that making it a template parameter causes twice as much
> code to be instantiated, which makes executables bigger and can cause
> more I-cache misses.
Worth a try. Will you make the change or will I? It seems to be
simpler doing than talking.
--
Regards,
Tim Shen