develooper Front page | perl.perl5.porters | Postings from January 2012

Re: whither study()?

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
January 30, 2012 09:45
Subject:
Re: whither study()?
Message ID:
CBEB176E-AF83-4E92-BDD6-CE212B8F913D@cpan.org

On Jan 30, 2012, at 9:15 AM, demerphq wrote:

> On 30 January 2012 18:12, Father Chrysostomos <sprout@cpan.org> wrote:
>> 
>> On Jan 30, 2012, at 8:59 AM, demerphq wrote:
>> 
>>> On 30 January 2012 17:46, Father Chrysostomos <sprout@cpan.org> wrote:
>>>> 
>>>> On Jan 30, 2012, at 12:23 AM, demerphq wrote:
>>>> 
>>>>> On 29 January 2012 21:52, Father Chrysostomos <sprout@cpan.org> wrote:
>>>>>> demerphq wrote:
>>>>>>> study() breaks stuff. It is currently subtly broken. It has been
>>>>>>> broken for a long time. It is poorly tested. And ive never actually
>>>>>>> seen it used in the wild.
>>>>>> 
>>>>>> Does the Perl core count as the wild?
>>>>> 
>>>>> Umm, no. Quick look at the dancing bear! :-)
>>>>> 
>>>>>>> Can we just no-op and
>>>>>>> deprecate it?
>>>>>> 
>>>>>> Can you do that without slowing down splain?
>>>>> 
>>>>> Does it really slow down splain?
>>>> 
>>>> Er, yes, it does.  But I don’t mean what you think I mean.  Oh, the irony!
>>>> 
>>>> The first two are *without* study.  The last two *with* study.
>>>> 
>>>> Pint:perl.git-copy sprout$ time ./perl -Ilib -Mdiagnostics -e 'warn "Died" for 1..50000' 2>/dev/null
>>>> 
>>>> real    0m10.182s
>>>> user    0m9.916s
>>>> sys     0m0.062s
>>>> Pint:perl.git-copy sprout$ time ./perl -Ilib -Mdiagnostics -e 'warn "Died" for 1..50000' 2>/dev/null
>>>> 
>>>> real    0m10.189s
>>>> user    0m9.908s
>>>> sys     0m0.059s
>>>> Pint:perl.git-copy sprout$ time ./perl -Ilib -Mdiagnostics -e 'warn "Died" for 1..50000' 2>/dev/null
>>>> 
>>>> real    0m10.263s
>>>> user    0m10.025s
>>>> sys     0m0.058s
>>>> Pint:perl.git-copy sprout$ time ./perl -Ilib -Mdiagnostics -e 'warn "Died" for 1..50000' 2>/dev/null
>>>> 
>>>> real    0m10.256s
>>>> user    0m10.010s
>>>> sys     0m0.058s
>>>> 
>>> 
>>> Please dont be cryptic -- I am not that clever. This looks to me like
>>> the ones with study() are slower.
>> 
>> That’s right.
> 
> So umm, we can rip it out?

I wouldn’t object.  But Jeffrey Friedl mentions in Mastering Regular Expressions that he uses it to speed up multiple regexp matches (for markup validation) against 475K strings.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About