[futurebasic] GOTO efficiency (was [FB] just a little bit over the line...)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: "Dr. Stratford" <sstratford@...>
Date: Tue, 19 Oct 1999 13:55:24 -0500
>there are some problems where a "goto" solution can be
>the most elegant, readable, and comprehendable available,
>not to mention the smallest and the fastest, don't you think?      :+)

I've been wondering about this for awhile, since I'm writing speed 
critical server CGI's...
Question: which compiles to faster and/or smaller code (pardon the pseudocode):

if not A then goto "1"
some A instructions
goto "END"
"1"
if not B then goto "2"
some B instructions
goto "END"
"2"
some not A and not B instructions
"END"

or

long if not A
   long if not B
     some not A and not B instructions
   xelse
     some B instructions
   end if
xelse
   some A instructions
end if

or

select case
   case A
     some A instructions
   case B
     some B instructions
   case else
     some not A and not B instructions
end select

Is the compiled difference pretty much negligible?


--Steve

_____________________________
Steven J. Stratford, InterNetyx.com
Supercharge your website!
www.internetyx.com
920-206-9197
_____________________________