Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: Question about curious performance of if...elsif block

by markseger (Beadle)
on Jan 17, 2012 at 12:28 UTC ( #948309=note: print w/replies, xml ) Need Help??

in reply to Re: Question about curious performance of if...elsif block
in thread Question about curious performance of if...elsif block

> Directly fetch and execute (if it exists) the specific subroutine that you want to execute.

For those of use who not only remember but actually used them, this sounds like fortran's computed goto statement. However in my case it's not that I want to execute different subs, but rather blocks of code. Can I do the same thing using labels? That really would make it a computed goto. ;)

However I would still like to hear any and all theories about why this curious behavior. The script in question is 'collectl', an opensouce project I released a number of years ago. It's a very light-weight system monitoring tool and am always looking for way to make it even lighter-weight and this feels like an opportunity.

On a different note, my comments about rhel6.2 were wrong. I forgot the VM has <100 processes so I'm actually executing have the number of tests and so the performance improvement over the earlier tests seems as little better but not that much better.


  • Comment on Re^2: Question about curious performance of if...elsif block

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948309]
[Corion]: marto: Oh ;) Well, I think you did right - more time, even if not spent with the kids directly, is still more time for you.
[Discipulus]: good morning monks! town holiday here.. but super busy
Discipulus time is not comarable with money.. when you have a roof and something to eat
[Corion]: Hi Discipulus! Busy making the town better? ;)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-06-29 08:34 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (655 votes). Check out past polls.