Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Just another Perl shrine
 
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 musing on the Monastery: (5)
As of 2014-04-17 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (459 votes), past polls