To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 2499
    Perl5 regexen: exponential backtracking behavior when mixing \n and \s —Todd Lehman
   Anyone out there running Perl 5.6 or higher? Try running this little test proggy that compares the approximate CPU execution times of two regexen: ---...---begin---...--- #!/bin/perl use strict; $^W = 1; sub cputime { my ($user, $sys, $cuser, $csys) (...) (24 years ago, 17-Dec-00, to lugnet.off-topic.geek)
   
        Re: Perl5 regexen: exponential backtracking behavior when mixing \n and \s —Christopher Lindsey
   (...) [lindsey@wolrab ~]$ uname -a Linux wolrab 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown [lindsey@wolrab ~]$ cat /etc/redhat-release Red Hat Linux release 7.0 (Guinness) s/(?:\n[ \t]*)+$// 0 0.00 1 0.00 2 0.00 3 0.00 4 0.00 5 (...) (24 years ago, 17-Dec-00, to lugnet.off-topic.geek)
   
        Re: Perl5 regexen: exponential backtracking behavior when mixing \n and \s —Todd Lehman
   (...) Awesome. Was that Perl 5.6? So it's smart enough to compile \n\s into a DFA instead of an NDFA? Wow. --Todd (24 years ago, 17-Dec-00, to lugnet.off-topic.geek)
   
        Re: Perl5 regexen: exponential backtracking behavior when mixing \n and \s —Dan Boger
     (...) yah, that's what I got as well: greywolf$ perl -v This is perl, v5.6.0 built for i686-linux guess 5.6 kicks bootie :) (24 years ago, 17-Dec-00, to lugnet.off-topic.geek)
   
        Re: Perl5 regexen: exponential backtracking behavior when mixing \n and \s —Christopher Lindsey
   (...) Yup! lindsey@wolrab|/afs/...dsey|[65]> /usr/bin/perl -v This is perl, v5.6.0 built for i386-linux Chris (24 years ago, 18-Dec-00, to lugnet.off-topic.geek)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR