On 07/13/2017 04:09 AM, Konstantin Tokarev wrote:
13.07.2017, 02:39, "Phil Bouchard" <[email protected]>:
On 07/12/2017 07:25 PM, Phil Bouchard wrote:
On 07/12/2017 04:56 PM, Konstantin Tokarev wrote:
Now add time of compilation to the sum
So I just did benchmark the following C++ file featuring a loop within
the code (the loop was at the bash shell level previously):
https://github.com/philippeb8/root_ptr/blob/qt/example/javascript_example1.cpp
With the exact equivalent in Javascript:
https://github.com/philippeb8/root_ptr/blob/qt/example/javascript_example1.js
And the executable generated by g++ is still 1.7 times faster than by
using Node.JS. For small Javascript perhaps the net speed are the same
but the more complex the code is then the generated binary by g++ simply
is faster when compared to the Node.JS interpreter.
The browser should "cache" these temporary executables anyway.
A you were following development of WebKit and JavaScriptCore, you should be
aware of story of using LLVM (i.e. "real" compiler) as a final JIT tier, and
how did it
end up.
https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/
Thanks I'll read that today but also I forgot to mention "if" we were
using a converter followed by a compiler then we could mix the two
languages which in turns could take advantage of high performance when
necessary (C++) and higher level algorithms (Javascript).
-Phil
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development