- From: Boris Zbarsky <notifications@github.com>
- Date: Thu, 27 Apr 2017 12:09:04 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 27 April 2017 19:09:37 UTC
> Presumably it would deopt into the same speed as any normal method call, yes? Normal DOM method call, as opposed to normal JS function call, right? It .. depends. I can only speak for SpiderMonkey at this level of specificity, and there is a bit more overhead here in SpiderMonkey than a normal DOM call, but not a lot more. Note that a lot of things that are DOM calls are not normal DOM calls, in both SpiderMonkey and other engines, in a variety of ways. But even the "slot path" vmcall really isn't _that_ slow. As in, I'd need to see a use case to see whether the performance matters. Chances are it does not. Your description of what you consider reasonable semantics sounds _very_ much like what typed arrays do. @domenic, @annevk thoughts on having a way for things with indexed getters/setters to opt into that sort of behavior? Honestly, we could just have `iterable<V>` on a thing with indexed getters induce all that stuff in addition to the things it induces now; we'd need to check whether we can define these operations in a way that works for existing consumers. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/issues/345#issuecomment-297810459
Received on Thursday, 27 April 2017 19:09:37 UTC