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

[REBOL] rebol weak points (i think) Re:(7)

From: g:santilli:tiscalinet:it at: 13-Sep-2000 11:36

[agem--crosswinds--net] wrote:
> Compiling the compiler into the runtime? Compilers can be small..
Even if it has to be smart enough to compile REBOL?
> Wheres the problem? yes, by default you have to lookup > each call in a table. for speed, to inline the primitives,
Would that really be faster than the current interpreter? Just a bit, I think. Is that worth the effort?
> there is a need for hotspot-style compilers. or marking > never-changing code by hand ("compile func"). (like
Yes, but that's something different. You can compile if you pose limitations, making REBOL more similar to compiled (or compilable) languages. But then, what's the point in using REBOL? I'd prefer a solution like: my-native: make native! [ ; compilable REBOL dialect here ] where you can speed up critical code. That would make REBOL the most powerful language --- you have speed, and you have a powerful high level language.
> if bind is allways bind/copy this works. note we have early binding in rebol, > which gives very good hints what will be called (can be reduced to indirect addresses IMO). > Compiler has to insert calls beetween the addresses, yes.
But then again you need the compiler in the runtime; I have dubts that such a "REBOL compiler" could be dramatically faster than the current interpreter. If you, instead, express the speed critical parts with an ad hoc designed compilable dialect, and then compile those, you get a dramatic speed improvement with just a little effort.
> i know SM-code is possible, but is it usefull?
It can be. You have the power, but have to use it with wisdom.
> make a block-entry big enough for some usefull code, > like add, if, .. and of course indirect call . if > you bind to a froozen primitive, copy its code, else > insert a call. if you store to a speed-block! , its > more costly, and you have to fight with code/data-cache-sync. > with fixed block-size one has to insert some nops > too. but modern prefetchers may like this way more > than interpreter-jumps?
I still think that's not worth the effort, but I might be wrong. The "COMPILE ..." or "MAKE NATIVE! ..." solution seems to me much simpler and useful.
> Can't be long until he thinks that job can be done > by Rebol too. if he changes the language a bit.. If
Why change the language, if you can just add a new dialect? If RT just includes some kind of fast "byte code" interpreter or compiler, then the compiler from the dialect to teh byte code can be easyly done in REBOL. It's much simpler, isn't it? Just IMHO, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila --