Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by perrin (Chancellor)
on Jul 31, 2007 at 17:24 UTC ( [id://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/$_; } } } }

Replies are listed 'Best First'.
Re^3: Nested evals - are they evil? (sample benchmarks)
by cLive ;-) (Prior) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://629877]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-03-29 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found