by fabiospampinato · 6y ago · 0 comments
That doesn't even run standard HTML/CSS/JavaScript. That fact alone would make me completely ignore it for any possible application.
This may very well be true depending on the use case, but I'd be very surprised if V8 doesn't just blow Sciter out of the water with regards to performance, like you can be a genius and come up with a comparable engine that's 50x smaller (e.g. QuickJS), but V8 is not big for bigness sake, it's also ~35x faster according to this: https://bellard.org/quickjs/bench.html
I'm mentioning QuickJS here because I couldn't find benchmarks comparing Sciter Script and V8, if anybody has some I'd be interested in seeing them.
And it really does not - in most of typical UI tasks Sciter is faster.
Reason is in different goals. Sciter is an embeddable engine. Script there is a glue: take output of one native function, transform it, and pass as input to other native function.
In places where UI needs maximum performance applications use native functions in C/C++, Rust, Go, etc. This allows to keep script VM compact and achieve maximum performance without sacrifices. Why do you need JIT or WebAsm (and tons of associated binaries) if you can compile what you need with battle-proof compilers to native code?
So good portions of jQuery were implemented natively. React[or] is also natively implemented - JSX is a part of script syntax (and so uses built-in native compiler), reconciliation (Element.merge()) is also native thus you don't need all that nightmare TS-to-JS, then load ReactJs script, then compile, then JIT-compile/warm-up, etc. All those ...
As of pure script performance ...
Slower than V8 but faster than, let's say, Python.
I'd really like to see some benchmarks about this, could you maybe make Sciter run the test suite QuickJS is benchmarked against and report back? https://bellard.org/quickjs/bench.html
> In places where UI needs maximum performance applications use native functions in C/C++, Rust, Go, etc.
That's cool, but I'm talking about JavaScript performance here, these kind of cross-language computations can totally be coded on top of Electron and I would imagine any other mature similar framework.
> if you can compile what you need with battle-proof compilers to native code?
The compiler might not be the problem here, not even the Chrome guys can manage to write completely memory-safe C++ for example, that's trivial to do in JavaScript and a reason why one might not want to write everything in C++ for example, among other potential reasons.
V8 in Electron comes bogged down with Chromium and its bloat. Sciter's engine does not. For building UIs, that's a huge difference.
But if you just need to create some relatively small utility, let's say, calculator.exe then it is pretty adequate for the task.
If you want to run something that is designed for Web browser then you need browser and server (Electron or Atom for example).
If making a calculator with web technologies is more important to me than making a very resource efficient one why would I _ever_ use Sciter for this that doesn't give me not proper web technologies to use and neither an actually resource-efficient calculator?
But even for more or less feature rich calculator, e.g. something like personal accounting/finances utility, you'd better have flexible UI.
Which would automatically mean Sciter would not be a good fit for this.
> you'd better have flexible UI.
If that's more important then why not going with proper web technologies?