World: r4wp
[#Red] Red language group
older newer | first last |
Steeve 22-Nov-2012 [4186] | I talk about Red not Red/system |
Kaj 22-Nov-2012 [4187] | Yes, Peter i right |
PeterWood 22-Nov-2012 [4188] | Me too! |
Kaj 22-Nov-2012 [4189] | is |
Steeve 22-Nov-2012 [4190] | I think you're both wrong ;-) |
Kaj 22-Nov-2012 [4191] | Red is a compiler, as simple as that |
PeterWood 22-Nov-2012 [4192] | Well I'm usually worng :-) |
Steeve 22-Nov-2012 [4193x2] | You're talking about Red/system not Red |
Red is evaluated | |
Kaj 22-Nov-2012 [4195] | No, we've been publishing that fact for almost two years now. I don't know what else we can do |
Steeve 22-Nov-2012 [4196] | like Rebol |
PeterWood 22-Nov-2012 [4197x2] | No, it is compiled like C. |
This might give you a clue - https://github.com/dockimbel/Red/issues/308 | |
DocKimbel 22-Nov-2012 [4199x2] | Kaj: nice! Actually, such kind of function (highly recursive, very small body) should perform 5-10 times faster than R3 in the target compiler. Functions with bigger bodies shoud be in the 10-15 range. Functions with pure math expressions should be in a 20-100 range. Though, these are very rough early estimates I did on the base of a few micro-benchmarks. |
Red is evaluated No, compiled. :-) | |
Steeve 22-Nov-2012 [4201] | why is kaj's script so slow then ? ;-) |
Kaj 22-Nov-2012 [4202] | No optimisations |
Steeve 22-Nov-2012 [4203] | okay T_T |
Pekr 22-Nov-2012 [4204] | Uh, what optimisations, Kaj? We are talking Red bing compiled to Red/System, so how comes, that the result is only 2 times faster than R3? I expected speed of nearly a R/S version. Something must be wrong, or Red would not make sense with such poor performance at all imo ... |
Kaj 22-Nov-2012 [4205x2] | The fact that you're complaining means that the optimisations are missing, isn't it? |
If Red doesn't make sense at all, then R3 doesn't make sense double at all | |
Pekr 22-Nov-2012 [4207] | Well, R3 is dynamic. We are supposed to give-up something in exchange in much bigger performance. And R/S gave us some rewards, being only some 4-5 times slower than C version? Now if Red is going to be orders of magnitude slower, I would be really disappointed ... |
Kaj 22-Nov-2012 [4208] | You can get Red/System speed if you write in Red/System, not if you write Red |
Pekr 22-Nov-2012 [4209] | Well, I thought, that Red code gets compiled/translated into R/S code, and that code is going to be translated into machine code :-) |
DocKimbel 22-Nov-2012 [4210] | Red is a high-level language with high-level abstract types. Once we get optimizations, Kaj's example should run 5-10 faster than R3. For some high-level expressions that have low-level counterparts, it is possible to achieve very high gains (in the 10-100 range), for those that do not have low-level counterparts, you can only expect typical gains from moving from an interpreter to a compiler (on average 5-10 faster). Also, there is also a source of additional speed gains: the possible runtime optimizations enabled by the JIT-compiler. |
Kaj 22-Nov-2012 [4211] | Yes, and that doesn't magically make it being programmed in machine code |
DocKimbel 22-Nov-2012 [4212] | Pekr: high-level language have higher level semantics (materialized in the case of Red by the runtime code in %runtime/ folder), you can't expect all that "disappear by magic" when translated to native code. It is not in the domain of possible things. :-) |
Steeve 22-Nov-2012 [4213] | to be exact R3 is 300-500 time slower than c compiled code in my last tests. So at least Red should be at leatst 30-50 times faster than Rebol |
DocKimbel 22-Nov-2012 [4214] | Those high-level layers are what makes Red able to accomplish all the things you like instead of being limited to a macro-assember level language (like C or Red/System). |
Kaj 22-Nov-2012 [4215] | Steeve, I look forward to your Red fork that does that |
Steeve 22-Nov-2012 [4216] | I forfeit |
Kaj 22-Nov-2012 [4217] | Your own REBOL clone, then? |
Steeve 22-Nov-2012 [4218] | it's the limit of the stack based compiler, simple to implement, slower than a registers based one |
Kaj 22-Nov-2012 [4219] | Only partly |
DocKimbel 22-Nov-2012 [4220] | Steeve, performances gains will depends on the kind of code you run. For micro-benchmarks (like loop 10'000'000 [tail? ""]), the target compiler should perform 5-10 faster than R3. For "normal apps", you should expect a 10-20 gain (very rough early estimates). For math intensive apps, you'll be able to go up to x100 speed gains. |
Steeve 22-Nov-2012 [4221] | (Kaj, I'm trying to port a text editor to R3 currently, gobs are terrible and some times horrific) |
DocKimbel 22-Nov-2012 [4222] | Steeve, it is not that simple (I wish it would). You forget to account for a lot of things like e.g., exceptions handling and the GC. |
Steeve 22-Nov-2012 [4223] | yeah, I forgot |
Pekr 22-Nov-2012 [4224] | Steeve - could you outline then, how would you change gobs in some other channel or wiki document. I e.g. don't want to support GTK or other bloatware yet, so it might be that I might sponsor View engine port, of course, being done eventually right. Gobs are definitely more optimised than Faces were though ... |
Steeve 22-Nov-2012 [4225x3] | I wanted to say terrible, in the sense of nice |
I think gobs are very handy, it would be nice to see a portage to Red | |
But they tend to crash R3 a lot when the command api fail | |
Henrik 22-Nov-2012 [4228] | Steeve, so the design is OK, but implementation needs work? |
Steeve 22-Nov-2012 [4229x3] | Pekr, Actually I only use gobs for the rendering part in R3, I completly rewriten myu own event handler and VID. |
I don't use the VID layer furnished by saphirion | |
Henrik, yes it still needs work to remove the crashs, and the text rendering is not perfect on Win7 but l think we can do everything R2 did. | |
Kaj 22-Nov-2012 [4232] | I will probably do a Gob-like binding on Enlightenment |
Pekr 22-Nov-2012 [4233x2] | never mind, talking about View engine itself. I don't like gobs logic in some aspects anyway ... I e.g. don't like separate gobs for text, color, image, effect, draw. Dunno low level logic, but it could be all in draw dialect. Simply put - always hated when you can do gob/text, but then you can do another text in terms of draw, ditto effect, etc. |
I mean - never mind you did not use VID ... | |
Steeve 22-Nov-2012 [4235] | I will post something on Github but I can't say too much too soon. I don't want to announce another abandonware. If I can finalize the text editing it could be the beginning of... something. :-) |
older newer | first last |