Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: Naughty match variables in CPAN?

by Dog and Pony (Priest)
on Jul 22, 2003 at 02:55 UTC ( #276576=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Naughty match variables in CPAN?
in thread Naughty match variables in CPAN?

Gotcha! I guess it is too late over here to read documentation. :)

But I still wonder how much of a penalty there is.


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.
  • Comment on Re: Re: Re: Naughty match variables in CPAN?

Replies are listed 'Best First'.
Re: Re: Re: Re: Naughty match variables in CPAN?
by diotalevi (Canon) on Jul 22, 2003 at 05:44 UTC

    Its apparently the same penalty incurred on a per-regex basis by using capturing. While working with Metacode::Reader I was able to get some very nice speedups by removing everything that copies data around. So instead of /H=(\d+)$/ I had substr $_, $-[0] + 2, $+[0] - $-[0] - 3. This is much less clear and not nice to read. In my case I was writing a high volumn database filter and the obfuscation was ok. I don't advocate at all taking this sort of step outside of really critical code that Devel::DProf has already highlighted as being slow.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://276576]
help
Chatterbox?
[Corion]: On the upside, I spend a lot of time thinking this weekend about how to actually implement rate limiting for futures, and if things work out, maybe even loading a configuration from an external file makes sense
[Corion]: I've also found some interesting invariants that I have to think/write about more. A simple rate limiter will never change the order of the input, while a limiter that allows for parallel execution will change the order. But my API currently allows for bo
[Corion]: ... for both, and I'm not sure if I want to add the cruft from the parallel API (a token that you need to hold on to while you hold the lock) to the rate limiting API too, to allow seamless up/downgrades, or not.
[Corion]: Also, rate limiting will look great with await: my $token = await $limiter-> limit($hostname); instead of my $f = $limiter->limit( $hostname )->then(sub { my( $token)=@_; ... });

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-10-23 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (277 votes). Check out past polls.

    Notices?