Private symbols as WeakMap sugar
brendan at mozilla.com
Thu Jan 17 12:08:23 PST 2013
Andreas Rossberg wrote:
> Actually, I don't see why this should have a measurable impact on
> anyway, what matters is how easy it is to specialise for the types
> actually seen at runtime. And there, this would just add yet another
> row to the (already complex) matrix of cases for receiver/index type
> pairs that you optimize for. The same might actually be true for
> symbols, depending on the implementation strategy.
Probably I'm more sensitive to the "generic" case, which while dog slow
still dogs some real-world critical paths (if not fake/lame/old benchmarks).
It all costs, David is proposing yet another cost. Maybe that's my final
> Like any new type or representation, it may cause deoptimization and
> increased polymorphism, but that's nothing new under the sun, and we
> are adding plenty of that with ES6.
In contrast, private symbols (any symbols, public/unique or private)
should benefit from existing property-in-receiver optimizations. Right?
More information about the es-discuss