Benoit Minisini wrote:
> As I never used Python, I don't really realized how much an equivalent of 
> partition() is needed.
To be honest, partition() doesn't do anything that can't be achieved using
Split() or Scan(), only reason i used partition() in Python is because it is
quite a bit faster than Python's Split() function.


Benoit Minisini wrote:
> But if Scan() is slower than partition(), it does not mean necessarily
> that 
> Python is faster than Gambas globally. For example, just iterating a void 
> loop 0..999999 takes 0,1s in Python, and 0,029s in Gambas 3.
Naturally, i agree comparing a single function is not an accurate
comparison. The reason i started this thread was because i was quite
surprised that my Gambas function was so slow when i was expecting it to be
significantly faster than Python.


Benoit Minisini wrote:
> If you want, I could make a partition() function temporarily just to
> compare 
> exactly the same thing between Gambas and Python. Do you?
It's not important, however i DO think that a "GetSubstring" style string
function would be useful if written in C:


CODE wrote:
> s = Substring(mainstring, startstring, endstring)   returns the substring
> in between startstring and endstring within mainstring. Return is empty
> string if not found.

Perhaps it's just me, but i would use this function all of the time for
parsing strings. I know that it's easily achieved using Split() or Scan()
but they are perhaps not as efficient??
-- 
View this message in context: 
http://www.nabble.com/Gambas-is-slower-than-Python---tp21521606p21531152.html
Sent from the gambas-user mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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