• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
25-Feb-2012
[1x2]
Faster floats branch released: https://github.com/dockimbel/Red/tree/faster-floats
Kaj: let me know how it performs on your test machine with Mandelbrot.
Kaj
25-Feb-2012
[3]
Cool :-)
DocKimbel
25-Feb-2012
[4]
I haven't tested yet that branch with older than PPro CPU...will 
do that now.
Kaj
25-Feb-2012
[5]
That's great
DocKimbel
25-Feb-2012
[6]
Seems it runs ok with older CPU too.
Kaj
25-Feb-2012
[7]
Is that branch up to date with the latest bug fixes?
DocKimbel
25-Feb-2012
[8x3]
yes it should
but it does not include the libc-init branch code.
getting bugs?
Kaj
25-Feb-2012
[11x2]
No, just checking, because I'm working on float stuff
First test looks three times as fast. I'll shut down the machine 
to do a clean test
DocKimbel
25-Feb-2012
[13]
On my Linux VM, it now performs as fast as C, but I'm not sure how 
accurate is the emulated clock.
Kaj
25-Feb-2012
[14]
Optimised or unoptimised C?
Andreas
25-Feb-2012
[15]
unoptimised
Kaj
25-Feb-2012
[16x3]
The times are small, so they become less accurate, and the printing 
comes into play
Here's my new table:
Mandelbrot
Syllable Server, AMD Athlon XP 1800+ (256 KB L2 cache)
						CPU Time	Relative
C (GCC -O2)				.025		1
C (GCC 4.4.3 i686)		.05			2
Red/System				.11 (0.3)	4
World (complex math)	4 (7)		150
World					6 (9)		250
Boron (i486)			7.5 (10)	300
ORCA (i486)				9 (12)		350
REBOL 3 2.100.111.4.4	9 (12)		350
REBOL 2 2.7.7			11 (13)		450
Ruby 1.8.7.248 (i486)	12 (15)		500
DocKimbel
25-Feb-2012
[19]
Ah, still no cigare :-)
Kaj
25-Feb-2012
[20]
I'm still impressed :-)
DocKimbel
25-Feb-2012
[21]
It's a bit strange, because the inner FP code should be identical 
between C and Red/System now. But anyway, it's more than enough for 
now.
Kaj
25-Feb-2012
[22]
Yes, I'm satisfied for now :-)
DocKimbel
25-Feb-2012
[23]
I hope that will be fast enough to make the USS Enterprise travel 
at warp speed? ;-)
Kaj
25-Feb-2012
[24x2]
It will have to travel back in time, because that will still take 
a while
I just saw the first black GL window flashing open and close in a 
splitsecond, that's all
Andreas
25-Feb-2012
[26]
i have a green gl window driven by red/s :) nothing more, yet, though 
:)
Kaj
25-Feb-2012
[27]
I have a case where the library wants to use a function that should 
be defined in the program. This doesn't work, apparently because 
Red/System doesn't export the function. The library can't resolve 
the symbol
Andreas
25-Feb-2012
[28x2]
We could try and export symbols for all [callback]/[cdecl]/[stdcall] 
functions.
What library?
Kaj
25-Feb-2012
[30]
OpenGL
Andreas
25-Feb-2012
[31]
What function?
Kaj
25-Feb-2012
[32x2]
The main UI loop I can work around it
but I can
Andreas
25-Feb-2012
[34]
What are you using, GLUT?
Kaj
25-Feb-2012
[35]
No, but it's a GLUT like emulation on top of SDL
PeterWood
25-Feb-2012
[36]
Kaj: It's comment {} not comment []. ... I tested your example using 
{} and it compiled okay.
Kaj
25-Feb-2012
[37x2]
I suppose both are allowed, as in REBOL?
{} can go wrong if there's a curly bracket in the code
PeterWood
25-Feb-2012
[39]
Comment [] is the word comment followed by a block in REBOL. It works 
because the block doesn't get evalutated.
Kaj
25-Feb-2012
[40x2]
I thought COMMENT takes one parameter, as it were?
In any case, a block works in Red/System, so it doesn't get compiled
PeterWood
25-Feb-2012
[42x2]
I don't believe Comment is a function in Red/System as it is in REBOL. 
I think it is more like a compiler directive.
A block will work with the compiler but not the pre-processor because 
the complier is working with loaded REBOL values whereas the pre-processor 
is probably working with string data.
DocKimbel
25-Feb-2012
[44]
Kaj: could you replace `print` by `putchar` in the Mandelbrot bench, 
so it is equivalent to the C version? (Not sure it would change much 
the timings, but at least, the sources will be equivalent).

`print newline` would then become `putchar lf`
Kaj
25-Feb-2012
[45x3]
In earlier tests it made no difference, but it may now because the 
times are small. Better test that without printing at all
A better way would be to increase the number of iterations
The preprocessor is block oriented now, isn't it?
DocKimbel
25-Feb-2012
[48x3]
Yes it is.
To be more precise, there's a string stage and a block stage in the 
preprocessor. All the compiler directive are processed at the block 
stage. The string stage is just a front-end to handle R2-incompatible 
syntax, like the Red/System hex notation, and count source lines.
Kaj: do you know why __libc_csu_init and __libc_csu_fini are not 
defined in libc in Linux? How am I supposed to pass them to __libc_start_main 
if I can't access them?