Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Oct 2 13:34:51 PDT 2012


On Oct 2, 2012, at 1:08 PM, Kevin Smith wrote:

> 
> On the other hand, if you have many instances that need to be branded I suspect that the distributed symbol based technique is going to have a better performance profile than the WeakMaps. 
> 
> Is this true?  Are there performance "caveats" that come with current WeakMap implementations?

Perhaps you thought we were handling out free lunches??  :-)

At the very least WeakMaps require an additional GC phase and associated house keeping.   From a generational collector perspective they act kind of like additional remembered sets -- additional objects that have to be scanned that might whose scanning might have otherwise been deferred until latter.

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121002/6439fcb7/attachment.html>


More information about the es-discuss mailing list