Removal of kjsembed from kdelibs

Maksim Orlovich mo85 at cornell.edu
Mon Jul 16 16:17:30 BST 2007


>
> Hi Christoph,
>
> Il giorno 16/lug/07, alle ore 15:17, Christoph Cullmann ha scritto:
>> the C++ API of KatePart. Scripts in Kate were 4 times faster in
>> kjsembed than
>> in QtScript, as their runtime is dominated by the calling costs in
>> most
>> cases :(
>
> interesting, because I put a lot of work on optimizing function
> calls, scope chain and and reuse of the activation object. In all my
> testes Qt Script was at least 2 times faster than kjs. For instance,
> in this awesome example (yeah thiago I know what you are thinking) Qt
> Script is pretty fast compared to kjs. I don't know.. maybe the
> QObject binding is slower than the one in KJSEmbed!?

There is no QObject binding involved, just internal/native API calls
there. Otherwise the 2x number is probably pretty fair, though it's gotten
much narrower. The difference really is that KJS is fast, but QtScript is
very fast.


>
> [roberto at localhost script]$ cat fact.js
> function fact(n) {
>    if (! n) return 1;
>    return n * fact(n - 1);
> }
>
> for (var i = 0; i < 1000000; ++i)
>     fact(12)
> [roberto at localhost script]$ time ./script fact.js
>
> real    0m6.233s
> user    0m6.167s
> sys     0m0.030s
> [roberto at localhost script]$ time ~/Local/KDE/bin/js fact.js
> LEAK: 18 KJS::Node
>
> real    0m12.421s
> user    0m11.786s
> sys     0m0.018s
> [roberto at localhost script]$

I'll consider this a challenge :-) Stuff relevant to this case is on my
TODO anyway..







More information about the kde-core-devel mailing list