Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: Comparing Regular Expressions

by vitoco (Friar)
on Sep 01, 2009 at 16:37 UTC ( #792699=note: print w/replies, xml ) Need Help??

in reply to Re^2: Comparing Regular Expressions
in thread Comparing Regular Expressions

Good point! I just wanted to compare equivalent substitutions.

Adding testC:

'testC' => sub { my $f = $test; $f =~ s/\s+,/,/g; $f =~ s/,\s+/,/g; +}, 100_000: Rate test1 test2 test3 testA testC testB test1 6.5/s -- -28% -66% -76% -80% -81% test2 9.0/s 39% -- -53% -67% -73% -73% test3 19.1/s 196% 113% -- -29% -42% -43% testA 27.0/s 318% 201% 41% -- -18% -19% testC 33.1/s 412% 269% 73% 23% -- -1% testB 33.3/s 416% 272% 74% 23% 1% --

C is 23% faster than A, even running twice over some of the commas in the test string. B doesn't touch a comma twice, but is only 1% faster than C.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://792699]
[Corion]: Hmm - is anybody aware of a "protocol-only" HTTP module? I'd like to teach Prima non-blocking HTTP ideally without using threads, but that means reimplementing/ rewriting something like HTTP::Tiny (except asynchronous) or AnyEvent::HTTP
[Corion]: Ideally, the HTTP state machine but with a way to feed it HTTP data whenever I get it instead of it actively doing stuff.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2016-12-07 15:06 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (128 votes). Check out past polls.