[futurebasic] Re: [FB] 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 15:32:58 -0500
_Given the same inputs_, I'm wondering if there's a difference in 
compiled speed.

> > IMHO the Case statement will run faster IF you arrange the Case 
>Options in the
> > order of greatest "likelihood". Of course, there will be some 
>instances in which
>> this cannot be predetermined; but, in most "cases" I think you 
>>will find that
> > there is a "greater probability" of occurrence that CAN be predetermined.
>>
>
> > "I" can't prove the Case Structure will be faster "otherwise", 
>but I suspect it
>> usually is AND "true", with current computer speeds, it is 
>>probably academic in
>> the first place.

It's not academic, it's practical in my case. I use FutureBASIC to 
write CGI's. A CGI is called by the server with a set of parameters, 
those parameters are parsed and action is taken, then a response is 
put together and sent back to the server. Generally, if you take away 
the parameter processing and response returning stuff, a CGI is just 
one big case statement that's executed a single time (as quickly as 
possible) and that's it. So I'm just curious if it's faster to 
structure my case statement with goto, if then, or case. The 
difference my be negligible, but it's worth asking if it saves a tick.


--Steve



> >
> > Joe Wilkins
>>
>