Re: Selectors: name find method and find signature

On 9/12/13 12:57 PM, Domenic Denicola wrote:
> That sounds cool too! I was just concerned it wouldn't be optimizable enough.

I think it depends on what you mean by "enough".

Getting properties out of an array is much faster in script (e.g. 
self-hosted) than it is via the C++ API, at least for SpiderMonkey.

After that, unclear....  Worth measuring.

But you raise a good point: the difference between doing [[Invoke]] and 
doing magic is observable, and we should decide which one we want.

> I just assumed that allowing implementations to optimize by directly reaching into selector caches etc. would be better. But you're the implementer! :) If internal properties are less optimizable than working in terms of querySelector, I'm fine either way!

I think it depends on what the "internal properties" bit is and how 
flexible it's supposed to be.

For example, if in this case the basic operation would be to check for a 
C++ Element instance and then call some C++ method with that instance, 
that's pretty optimizable.  But if it's something that can be varied 
independently of being an Element, then it's not so easy to optimize.

-Boris

Received on Thursday, 12 September 2013 17:04:28 UTC