[Gambas-user] Gambas is slower than Python??
Benoit Minisini
gambas at ...1...
Sun Jan 18 01:42:28 CET 2009
> On samedi 17 janvier 2009, birchy wrote:
> >
> > PUBLIC SUB Main()
> > DIM i AS Integer, t AS Float, s AS String
> >
> > t = Timer
> > FOR i = 0 TO 999999
> > s = GetSubstring("QWERTYUIOP", "WE", "IO")
> > NEXT
> > PRINT Timer - t
> > END
> >
> > PRIVATE FUNCTION GetSubstring(doc AS String, startstring AS String,
> > endstring AS String) AS String
> > RETURN Split(Split(doc, startstring)[2], endstring)[0]
> > END
The previous code takes 4,31s on my PC with Gambas 2, and 3,01s with Gambas 3.
--
Benoit Minisini
More information about the User
mailing list