Mid$ slow

BlitzPlus Forums/BlitzPlus Programming/Mid$ slow

Is possible that Mid$ command is really slow ? anyone try to make a long cicle with mid$ command inside ? try this stupid source to test it:

Temp$="try"
Tim=millisecs()
for i=1 to 9999999
a$=mid$(Temp$,1,1)
next
print millisecs()-Tim
input

is only mine problem ? there are some other solution to make a mid$(string,start,lenght) at more fast speed ?

it took 26seconds on my crappy 15gig p4 at work to the command 10 million times.. erm i would say that was ok. At 1000 times it takes 2ms which is nothing.

deleted - missread post

try
temp$ + temp$
instead of mid$(...) and you will find a similar calculation time. It's not so slow: 2.5 microseconds per operation on my PC.

Mimi

you must mean millisecs as microsecs would be real sweet!

no I mean microseconds!

Oh OK, I assumed a type based on the fact that you can only measure Millisecs in Blitz.