scriptorium icon indicating copy to clipboard operation
scriptorium copied to clipboard

Please add ZetScript

Open jespa007 opened this issue 6 years ago • 1 comments

Hi r-lyeh,

I would like to know whether is possible to eval ZetScript in your performance list test.

Currently ZetScript links dinamically by default but I attached the static version below,

zetscript-1.3.0_static.zip

And the equivalent Fibonacci script for ZetScript is typed below,

function fibR(n)
{
    if (n < 2) { 
     	return n; 
    }

    return fibR(n-2)+fibR(n-1);
}

print("fib: " + (fibR(34)) );

Cheers,

jespa007 avatar Apr 24 '18 10:04 jespa007

Hi @r-lyeh-archived and happy new year,

I have recently updated ZetScript at 2.0.0. The speed it has increased ~2.5 times.

I attach the new release here,

zetscript-2.0.0.tar.gz

Howewer, with all the changes made, fib.zs script it has to change into the following,

function fibR(n)
{
    if (n < 2) { 
     	return n; 
    }

    return fibR(n-2)+fibR(n-1);
}

Console::outln("fib: {0}", fibR(34) );

By default cmake project it compiles ZetScript statically so I think it fits the requirements.

Cheers,

jespa007 avatar Jan 10 '24 11:01 jespa007