[Gambas-user] Gambas is slower than Python??

Benoit Minisini gambas at ...1...
Sun Jan 18 21:53:34 CET 2009


On dimanche 18 janvier 2009, Jaap Cramer wrote:
> I timed the function with this line  s = Scan("QWERTYUIOP", "*WE*IO*")[1]
> to be 2.948007999919 seconds But there is a faster way:
>
> s = Mid("QWERTYUIOP", InStr("QWERTYUIOP", "WE"), InStr("QWERTYUIOP", "IO"))
> only takes 0.525806999998 sec!
>
> Maybe the Scan function is not that optimized? :)
>
> Jaap
>

And I'm not sure your code does the right thing. :-)

-- 
Benoit Minisini




More information about the User mailing list