Comment #5 on issue 2472 by [email protected]: Optimize hasOwnProperty
https://code.google.com/p/v8/issues/detail?id=2472
This has many real-world implications, as user-land caches will often use x
in y to check if a property is cached, because x in y allows for
`undefined` to be cached value. This is unfortunately ambiguous when it
comes to if (x[y])
Unfortunately `y[x] === undefined` check is so much faster then `x in y` we
often resort tedious acrobatics such as storing sentinel undefined values.
see:
https://github.com/emberjs/ember.js/commit/8cd1e18b97ea453cb74267a0cca620c54f087748#diff-845b71768b2891302a6a3adf45cd55f0R27
and
https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/cache.js#L13-L44
Avoiding the x in y was the heard of several optimizations that resulted in
10%-20% faster render times in ember.js
https://github.com/emberjs/ember.js/pull/4329
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.