[futurebasic] Re: [FB] random strings

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

From: Derek Smith <dereksmi@...>
Date: Tue, 27 Oct 1998 13:25:49 -1000
> 
> I'm just curious, is there any speed difference in getting the string length
> with PEEK compared to getting it with LEN? Would this:
> strLen=PEEK(@given$)
> be any faster (even slightly) than
> strLen=LEN(given$)
> I know the difference would be so small it wouldn't really make a difference,
> but nonetheless I'm curious.

Matt,

LEN(t$) compiles directly into a peek statement so, no it would be
precisely the same speed, minus a possible function call overhead to the
FB runtime.  We're talking nanoseconds.

-Derek
----------------
www2.hawaii.edu/~dereksmi
----------------