lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2/20/17, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
> On 21 February 2017 at 00:43, Hisham <h@hisham.hm> wrote:
>> On 20 February 2017 at 21:28, Dibyendu Majumdar <mobile@majumdar.org.uk>
>> wrote:
>>> Javascript on the other hand has had a lot of success with multiple
>>> successful JIT implementations.
>>
>> I don't follow the Javascript space closely, and I always assumed that
>> V8 was the relevant player there when talking stand-alone JS
>> implementation, so this got me curious. Which are the other ones?
>
> Mozilla SpiderMonkey
> WebKit JavaScriptCore
> Microsoft ChakraCore
>
> And interesting none are tracing JITs as far as I know.
>
> Regards
>


I gave this talk at the Lua Workshop this past year "A Lua embedder
thrown into the JavaScript world".
https://www.youtube.com/watch?v=Xi_eMGO3g-o

My experience is that v8 is completely overrated. And I randomly
encounter other benchmarks, usually the automated nightly build type
where nobody is trying to prove anything, and those also show v8 is
overhyped. Typically, I see the others beat v8 in a lot of categories.
v8 might beat others in some very narrow types of benchmarks. But
overall, all the major ones seem roughly comparable in speed. And for
the real world (non-benchmarks), you see in my talk, v8 was awful for
me.

The NodeJS people are built on v8, so there is a lot of inertia.
However, building libraries on top of v8 is nuts, since C++ does not
guarantee ABI stability, and Google v8 themselves do not even
guarantee API stability, and have broken things.

JavaScriptCore on the other hand, provides a pure C API. And as far as
I know, they have not broken the API or ABI since its introduction way
back in Mac OS X many years ago. Apple understands and cares about
deeply, how to build libraries for other people to use. Appcelerator
switched away from dual v8/JSCore to all JavaScriptCore, and React
Native is also built on it now.

-Eric