[Gambas-user] Gambas is slower than Python??
Benoit Minisini
gambas at ...1...
Sun Jan 18 21:52:38 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
>
Not in Gambas 2 anyway. It was in Gambas 3, but as this function is more
powerful than just looking for one or two strings into another one, it can
only be slower.
--
Benoit Minisini
More information about the User
mailing list