Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Nested evals - are they evil? (sample benchmarks)

by perrin (Chancellor)
on Jul 31, 2007 at 17:24 UTC ( #629877=note: print w/ replies, xml ) Need Help??


in reply to Re: Nested evals - are they evil? (sample benchmarks)
in thread Nested evals - are they evil?

I would expect eval to be a little slower, but not that much. Maybe this is because of the extra scope you're adding here. Try changing the no_eval_code to this, to see if the extra scoping is free or not:

sub no_eval_code { for (reverse 0..9) { if ($_==0) { error_sub(); } else { { my $x = 100/$_; } } } }


Comment on Re^2: Nested evals - are they evil? (sample benchmarks)
Download Code
Re^3: Nested evals - are they evil? (sample benchmarks)
by cLive ;-) (Parson) on Jul 31, 2007 at 17:57 UTC
    heh
    Rate eval noeval eval 88768/s -- -39% noeval 146161/s 65% --

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629877]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2015-07-05 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls