Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: New competition: do you accept the challenge?! :-)

From: moliad:g:mail at: 6-Nov-2007 21:50

Alessandro, there is one thing you must consider about rebol, and that is the fact that rebol strings are mutable. I am not sure about java, but if you take python as an example, although from a high-level strings *look* mutable, they are not, just like C (which is one of the reasons its so easy to integrate C stuff natively in python, they act and think alike, from within). REBOL can actually 'CHANGE a string. So although I have not yet looked at your algorythm yet, I have had many situations where I was able to take advantage of this and multiply speed tremendously. when I got to comparing python and REBOL they where similar except when some stuff was compilable to C modules in python, where REBOL gets creamed, but otherwise I could often make REBOL faster cause it does not have to RE allocate every string operation all the time. I will be looking into your code, and can already think of several approaches to string handling which have worked for me in the past, so depending on your specific test, one might come as being a few times faster than the others. also know that one specific can make REBOL string handling several times faster (or slower, depending how you see it ;-) and that is knowing the final length of the string or if you even know in advance, about what will stop the loop. when the length is variable and you must stream the output based on the actual string comming in, I can tell you that many things in parse, when optimised for speed are (sometimes MUCH) faster than C compiled code. -MAx On 11/6/07, Alessandro Manotti <ale870-gmail.com> wrote: