On Fri, 15 Apr 2011 08:48:10 -0400, shawn wilson wrote:
> but, sense it is jumping to a different place in the stack, isn't it
> more efficient than doing the above mentioned
> 
> my $done = 0;
> while( !$done ){
>    $done = 1 if( contition );
>    do_work;
> }
> 
> vs
> 
> for(;;) {
>    goto DONE if( contition );
>    do_work;
> }
> label DONE;
> 
> i'd think the later would be faster not only because you are jumping to
> a memory location and because you're not assessing a value every time.

Exactly why would you care about what would be at best milliseconds of 
execution speed more than maintainability?  Seems like you'd be better 
off programming in assembler if that's your priority.  Execution speed 
hasn't been a primary concern since the '70s, if it was even one then.

-- 
Peter Scott
http://www.perlmedic.com/     http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
http://www.oreillyschool.com/courses/perl3/

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to