[Patch] Regex bracket matcher cache optimization

Paolo Carlini paolo.carlini@oracle.com
Wed Jan 8 10:20:00 GMT 2014


Hi,

On 01/08/2014 10:24 AM, Jonathan Wakely wrote:
> 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.
I only want to add that, besides keeping compile-time under control for 
4.9.0 - please investigate a bit more along the mentioned lines - we 
should also start experimenting with exporting the instantiations. I 
don't know what the other implementations are doing, but in general it 
definitely makes sense, for compile-time performance too. I think we 
already said that some time ago, but the issue seems more important now. 
Maybe it's really unavoidable if we need template complexity for first 
class run-time performance.

Paolo.



More information about the Libstdc++ mailing list