[REBOL] Rebol,speed and asembly-like dialect...WAS: [Re: Re: Is Rebol code small
From: cyphre::seznam::cz at: 20-Nov-2002 12:10
Hello Carl and all on the List,
----- Original Message -----
From: "Carl at REBOL" <[carl--s--rebol--com]>
Sent: Wednesday, November 20, 2002 12:48 AM
Subject: [REBOL] Re: Is Rebol code smaller?/Compiler!
> Hi, this is Carl, and perhaps I can help clarify:
> The first statement is true. REBOL code is not known to be code until it
> executed. Well written REBOL programs contain a nice mix of code and data
> that give the program greater power. GUI code is a good example of that.
> But, that trade-off makes REBOL tough to compile.
I agree, the possibility to compile Rebol code is not much real because of
behavior and philosophy of the language itself. I was thinking many times
how to speed up Rebol and got some ideas:
-Does we really need to compile exactly rebol code with it's syntax and all
-Probably not. We just need to speed up time-critical particular tasks of
our Rebol programs such as bit operations, intensive math loops etc.
-So the solution should be in COMPILE native function with a block parameter
carrying asembly-like dialect. Rebol would have built-in fast, highly
optimized "virtual microprocessor" with simple, small and compact
micro-instruction set designed for such interpret-time-critical operations.
What do you think about that idea? Would this solution speed up Rebol? Would
be an emulation of simple and fast virtual-machine designed for primitive
but lighting fast low level operations with compile-on-the-fly calls from
the Rebol interpret be a speed advantage or am I wrong?
> The second statement is more complex, and Ammon is correct. If you code
> well, REBOL is quite fast for most tasks. In View, I've seen some GUI
> scream, and I've seen the opposite too. Folks like Cyphre have written
> time games, that amaze us... so the View compositing engine is quite fast
> (as fast as C code). The problem comes in knowing exactly what and how
> to control view faces (the "atoms" of GUI)... and for that, we need to
> provide you
> with more documentation... soon.
View's compositing engine is fast for lot of application but I think there
should have been some rendering performance enhancements done. View is fast
when you work with small faces but there are cases when you need to refresh
bigger(640x400 and more) faces for example containing DRAW dialect and then
the power of the engine goes rapidly down even you refreshing some simple
shapes. This performance problems are visible up to 600-1000Mhz PC boxes...
Also the DRAW dialect has still some annoying bugs and IMO the rendering
routines should be faster because when you are handling longer DRAW dialect
blocks there is also significant speed decrease. Also the polygon and
filling routines aren't the best...
Another important thing is also good keyboard control...Rebol keyboard
handler has lot of problems(the most important event such as 'key-up is
still missing :( ) so even you make a nice visualisations you hit problems
how to efficiently control them by user....
Last thing I would like to point out is a sound support. Forgetting it is a
payed feture, it lacks such simple(and common) features like: sample loops,
multichannel mixing...also using the sound port significantly slow down the
overall rebol performance...
I don't want to repeat again all the problems and bugs because this was
said(and send to feedback) so many times. I'm just dissapointed that such
little annoying details, which can any C and gfx guru(Holger?...name your
favorite ;-) ) fix and even enhance during half a year of intensive work,
are still present for more than one year in View. What a pitty! View is a
great engine and with such improvements would be able to compete (together
with the advance of the Rebol language itself) with Flash and other engines
without any problems.
just some thoughts...
PS: Even though all of those problems (and my for some people maybe a
negativistic POV ;-) ), I really love to develop Rebol/View apps and
planning to make another really cool and amazing game(christmas surprise?
well, If I find some spare time;-) ). It is so great system and language!
Thank you, Carl and all the RT gang for it! I hope next year in those time
we will have fixed and faster View release available ;-)