emberjs/ember.js — pull request #4158 by stefanpenner (2014-01-16 03:05:02+00:00)
Title: improve performance of Ember.guidFor and Ember.generateGuide on

Ember.Objects

Ember's guidKey uses defineProperty so that it is not enumerable,
this is a great idea, but can cost be a hard hit. Luckily though,
we pre-shape all ember objects to have a GUID_KEY slot. Unfortunately,
in guidFor and generateGuid we redefine the property. Not only is this
wasteful, but Object.defineProperty is incredibly costly.

Some micro-benchmarks:

- http://jsperf.com/generate-guid-key
- http://jsperf.com/faster-guid-for-test