Removal of kjsembed from kdelibs

Roberto Raggi roberto at kdevelop.org
Mon Jul 16 14:40:07 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!?


[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]$


ciao robe





More information about the kde-core-devel mailing list