On 07/13/2012 12:18 PM, Brendan Eich wrote:
> Because many objects (most in popular workloads for which V8's nursery 
> collection
> wins) are short-lived and by definition won't be moved, so they should not be
> taxed by an optional private-keyed identity property.
> 
> Don't walk into known performance trees head-first. Given the private-keyed
> identity option, there's a choice on when to add it. That choice per lots of
> Scheme research (I heard of this via Lars Hanson, who IIRC used it in Larceny 
> and
> his GC research under Will Clinger) is on GC-move, not on first-use-as-key.

That's possible.  However, we differ in a number of ways from Scheme.  Private 
names would use the same property storage mechanism as all other properties.  
That mechanism must be reasonably fast because we use it all the time (and I 
suspect we can make it faster as we continue to simplify it).  In Scheme, 
however, I'd expect the addition mechanism to be an unusual operation performed 
infrequently.  So it wouldn't need to be optimized as much for Scheme to be 
efficient, therefore likely wouldn't be, and therefore would probably impose a 
greater cost on them than a similar scheme would for us.

But then again, maybe not.  "Numbers, Mrs. Landingham."  With an implementation 
written the right way (and I'm sure we'll accept nothing less) it'd be easy to 
benchmark and get a conclusive answer.

Jeff
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to