Is REBOL interpreted or byte-compiled?
[1/4] from: princepawn::lycos::com at: 29-Aug-2000 12:23
Is REBOL interpreted or byte-compiled? The reason I ask this is I see get word called 800,000 times below and I hope that each invocation does not incur the overhead of a function call. source: func [ "Prints the source code for a word." 'word [word!] ][ prin join word ": " if not value? word [print "undefined" exit] either any [native? get word op? get word action? get word] [ print ["native" mold third get word] ] [print mold get word] ] --- ; run this in your ; <a href=http://www.rebol.com>REBOL</a> Interpreter! terrence-brannon: [ [princepawn--yahoo--com] perl-refugee myth-gamer ] perl-refugee: [ 'loved href perl discovery: (metaperl = rebol) 'hates href perl ] myth-gamer:http://www.bungie.net/bin/stats.pl?player=princepawn ; angles makes this a href instead of code! use ur imagination! href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ] perl: href http://www.perl.com "Perl"
[2/4] from: tim:johnsons-web at: 29-Aug-2000 13:25
Howdy: As I understand your question: Rebol is interpreted. Even if it were byte-compiled, I presume that you would still have function calls, but optimized. Furthermore, in the case of Python or Elisp (as in Emacs) doesn't the interpreter need to be present to "interpret" the byte-compiled syntax? This is a interesting question and I hope there is more response to it and further: I believe that the term "byte-compile" has different implementations in Java as opposed to Python. And maybe this is something in Rebol's future. After all, I have seen the Rebol Development Team pay close attention to suggestions from List members. See 'ya Tim [princepawn--lycos--com] wrote:
[3/4] from: g:santilli:tiscalinet:it at: 30-Aug-2000 21:30
Hello [princepawn--lycos--com]! On 29-Ago-00, you wrote: p> Is REBOL interpreted or byte-compiled? It is interpreted. Compiling REBOL is virtually impossibile, unless you want to do some magic (but that wouldn't be very fast, I think). p> The reason I ask this is I see get word called 800,000 times p> below and I hope that each invocation does not incur the p> overhead of a function call. Well, SOURCE isn't certainly a critical function. :-) Anyway, you could use the following "optimized" version if you really want to. source: func [ "Prints the source code for a word." 'word [word!] ][ prin join word ": " if not value? word [print "undefined" exit] word: get word either any [native? :word op? :word action? :word] [ print ["native" mold third :word] ] [print mold :word] ] Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[4/4] from: agem:crosswinds at: 31-Aug-2000 14:42
kind of a forth-compiler with some steps more in the interpreter could do it, except of "one time bindings" like objects (a/b , find the b). should be as fast as bytecode?