Re: [pcre-dev] JIT speed tests

Startseite
Nachricht löschen
Autor: Zoltán Herczeg
Datum:  
To: ND
CC: Pcre-dev
Betreff: Re: [pcre-dev] JIT speed tests
I don't know your use case, but if startup performance is really important for you, I would recomment to do the JIT compilation on a separate thread, which passes back the optimized patterns to the main thread one-by-one. This way your application gradually become faster. This may not help if you frequenlty restart your application. You can also try to compile only slow patterns, usually 10% of patterns takes 90% of runtime.

It is also possible that the JIT does not help you. No solution is perfect, everything has advantages and disadvantages.

Regards,
Zoltan

ND <cthuj2002@???> írta:
>On 2013-03-25 08:57, Zoltán Herczeg wrote:>
> This is an exponential case for the code generator.>The code generator >
> optimize these patterns one-by-one, and this process requires a lot of >
> time and an enormous stack space. Where do you use such pattern? Can't >
> you use a better pattern?>
>>

It's not a real pattern.>
My application hardly uses callouts and all of backtracking verbs. Some >
time ago I have a hope that if JIT starts to support callouts and all >
backtracking verbs then it speeds up my application. Now You did this >
changes to JIT engine (thanks alot). But when my application starts with >
this PCRE build it deal all things much slo-o-o-o-wly.>
I knows that JIT compilation time is much longer then interpreter. But I >
be sure that this is not a problem because regular expressions can be >
precompiled. I did't know nothing about PCRE can't precompile JIT data. >
And only when I see a slowing of my application I found in documentation >
this fact. I'm very disappointed...>
>
>
> Ahead-of-time (AOT) compilation is not really useful in my experiences, >
> because pointers are not known at compile time, and you need to replace >
> them by costly memory reads and writes.>

Are there this memory reads/writes more costly then JIT-recompiling?>