On 3/28/14 2:15 PM, Gregory Szorc wrote:
I'm concerned about this as well.

Is the concern the spew, or the performance of changing __proto__?

In practice, what gets slow with a changing __proto__ is property access on the object, because the JS engine throws away type inference information and marks the object unoptimizable when you change __proto__.

But "slow" here is a relative term. Last I measured, something like a basic property get in Ion code went from 2-3 instructions to 20-30 instructions when we deoptimize. That's huge on microbenchmarks or for objects that are being used to store simulation state in physics simulations or what not, but I doubt the difference matters for your sqlite connection case. In fact, I doubt the consumers of your API are even hot enough to get Ion-compiled. And the impact of __proto__ sets is much lower in baseline, and nonexistent in interp, I believe.

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to