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

Applications of Rebcode

 [1/7] from: edoconnor::gmail::com at: 9-Nov-2005 15:39


From what I've read on Carl's blog, rebcode can be used for "special graphics routines, math operations, unique search methods, and more." Can anyone describe any examples of common applications/scripts that are expected to benefit from rebcode? It sounds like rebcode could give REBOL a boost for select language benchmark tests, which is nice. I'm curious to learn if there is any particular genre/class of scripts that stand to benefit significantly. Thanks. Ed

 [2/7] from: petr:krenzelok:trz:cz at: 9-Nov-2005 23:05


Ed O'Connor wrote:
>>From what I've read on Carl's blog, rebcode can be used for "special >graphics routines, math operations, unique search methods, and more."
<<quoted lines omitted: 5>>
>Thanks. >Ed
Hi Ed, some application might be even 30times faster, some only few times faster, some application even don't make sense. The best benefit will imo be rebol interepreter loops replacement in operations like pixel pick/poke - try to change 1024x768 image using rebol loop, you will find it unusable. With Rebcode, it will be much faster, although still many times slower, than if you would do it using C routine. However - rebcode is portable and does not require you to have /Pro license. What is a trouble though a bit, is the fact, that to be fast, rebcode does not do much of checkings to prevent errors, so you can write bad rebcode, which can crash rebol, or at least this is how I understand the situation. Of course some folks don't like that, as we e.g. plan browser-plug-in. I don't see it personally as a problem, but it could be regarded being a security flaw ... but let experts speak here ... -pekr-

 [3/7] from: edoconnor::gmail::com at: 9-Nov-2005 18:07


Thanks Petr. I'm just trying to wrap my head around how I might use rebcode, and if there is a category of scripts where it could be commonly used (e.g. CGI, Draw, etc.). I mainly use REBOL as a shell/batch-processing language, to parse, modify and generate text files-- basic stuff. I've read about image-poking as a classic scenario for rebcode, but I don't think I've ever needed to manipulate images at the pixel level. That's why I'm trying to learn about other situations in which rebcode might be useful. Thanks again. Ed On 11/9/05, Petr Krenzelok wrote:

 [4/7] from: Izkata::Comcast::net at: 9-Nov-2005 18:52


> Ed O'Connor wrote: >>>From what I've read on Carl's blog, rebcode can be used for "special
<<quoted lines omitted: 14>>
> some application might be even 30times faster, some only few times > faster, some application even don't make sense.
And Geomol found an instance in one of his scripts where Rebcode was actually slower than normal Rebol...

 [5/7] from: greggirwin:mindspring at: 9-Nov-2005 23:39


Hi Ed, EOC> Can anyone describe any examples of common applications/scripts that EOC> are expected to benefit from rebcode? It's one of those "when you need it, you'll know it" things. :\ Probably only 5% of REBOLers will ever need to use it and, of those, they will only use it 1% of the time. For certain things, though, it will make a big difference. For example, Cyphre wrote a convolution engine demo. That's a fairly specialized tool, but could be very important to some people. Something with slightly broader appeal are the bit twiddling ops (shift, rotate, etc.). With those--and you can wrap them for easy access from REBOL--you can implement algorithms that would otherwise be a real pain (and very slow). So, things it's good for: Image access and modification. Series access and modification (e.g. if doing heavy access in loops). Bit twiddling. Fast math that only uses integer and decimal values. -- Gregg

 [6/7] from: SunandaDH::aol::com at: 10-Nov-2005 4:27


Ed:
> Can anyone describe any examples of common applications/scripts that > are expected to benefit from rebcode?
Many of the scripts at REBOL.org that do maths processing in bulk would benefit from rebocde, as would some others: http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?filter=math But some would not, or not to any great extent. Just taking a look at some of them (I'm making assumptions without having tried to convert them to rebcode, so I may easily be proved wrong): My own oneliner-prime-factors.r would speed up many times with rebcode. But it could be doubled in speed (at least) without rebcode if I were not limited to 132 characters. game-of-life-variation.r would benefit a little from rebcode driving the maths. But the part of the script that is slowest is the 'show for changed cells -- each cell is a separate VID face, and massed 'shows are slowing it down. I suspect it may be mega fast with rebcode AND a change to manipulate an image rather than an array of faces. oneliner-pi.r -- looks a good candidate for a rebcode speed-up transpose.r -- I have no idea if rebcode would help here or not. Sunanda.

 [7/7] from: edoconnor::gmail::com at: 10-Nov-2005 9:03


Thanks for your answers, everyone. Ed

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted