An Introduction to JS-Ctypes

Andrea Giammarchi andrea.giammarchi at gmail.com
Sat Sep 17 19:48:52 PDT 2011


Function VS eval is another story and Function does not suffer scope and
context, eval does.

Minifier don't care about function, Firefox seems to optimize the body same
as it does with any other function but still ... this is another story and
if a function does 1 operation rather than 10 I can't see how this can be
slower.

Again, does not matter for this topic, neither for my bench since the
function creation is one shot per type definition plus that is the shim part
Firefox should ignore in favor of ctypes while other browsers are, in therms
of instance creation and usage, basically as fast as other two loops.

So here I don't understand why Sam had to bring it into the discussion ...
anyway, still missing the answer from you Brendan:

Why JS.next is bringing StructType and requires an "object description" per
each created instance ?

What is wrong with new DefinedStruct(propA = 123, propB = 456); or why this
has not been considered ???


On Sat, Sep 17, 2011 at 9:08 PM, Brendan Eich <brendan at mozilla.com> wrote:

> On Sep 17, 2011, at 3:02 PM, Brendan Eich wrote:
>
> > An exception, or special case if you will: using Function or eval up
> front, hoisted and common'ed out of loops, and (this is crucial
>
> "for eval", I meant to write here.
>
>
> > ) not called from a function that you want optimized, in order to
> generate optimized JS. This kind of "query optimization" or JS-in-JS
> specialization is done, e.g. by ExtJS and other Ajax libraries. Also by a
> simple assembly-to-JS trace compiled emulator that Robert O'Callahan blogged
> about here:
> >
> >
> http://robert.ocallahan.org/2010/11/implementing-high-performance-emulator_01.html
>
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110918/110777ca/attachment-0001.html>


More information about the es-discuss mailing list