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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to