by eawoifjaiowepfj · 4y ago · 0 comments
It is actually not the fact that V8 in context of Sciter alike use cases will be faster.
Consider this statement:
document.body.patch(<body>Hello world</body>);
In case of Sciter this expression runs with native speed. JSX is built-in and element.patch() method is native.While in browser, in case of ReactJS, you will run that patch() (reconciliation procedure ReactDOM.render) with JS VM speed as that algorithm is implemented on JS/TS.
The whole point of Sciter is in its embeddability - you can add native objects of your app callable directly from script. Check this example of native object: https://github.com/c-smile/sciter-js-sdk/blob/main/demos/int...
So you really don't need V8 JIT infrastructure to achieve max performance - just add native objects when needed.
UPDATE: Now I have read the linked article, here is the reasons (copied from the article):
API and integration principles are close to what TIScript uses – it took me just 1 month to add QuickJS to Sciter core. And 4 months more to expose HTML/CSS runtime to JS.
Relatively compact implementation – QuickJS is slightly more fatty (by 100 kb) but still in acceptable range. For the note: full version of V8 is about 40 mb – 5 times larger than Sciter itself;
Liberal MIT license. Sciter cannot use GPL/LGPL code – many customers expressed this requirement;
Readable source code. Well… almost readable.
"Relatively compact implementation – QuickJS is slightly more fatty (by 100 kb) but still in acceptable range. For the note: full version of V8 is about 40 mb – 5 times larger than Sciter itself"
40 Mb came from Node.JS distribution (V8 + native runtime = node.exe). Sciter is more comparable to NodeJS as it includes good chunk of NodeJS alike runtime too.