emberjs/ember.js — pull request #4917 by stefanpenner (2014-05-22 13:09:08+00:00)
Title: Experiment: branding over instanceof

My motivation was to reduce the cost of the Alias check. I'm just playing with this, but posting it as a PR so others can see.

My initial take has been the rest of the costs are much higher, so this doesn't really have a large impact yet.

Perfs:

- prefer brand check of internal Constructors then an very costly instance of
- Mixin
- ComputedProperty
- Alias
- Descriptor

Mixin:
- initialization now interactions with arguments in an efficient manner
- initialization now uses a fast for loop instead of a map
- ensure the object shape stays the same (always has a mixins property)

Micro benchmarks:
http://jsperf.com/brand-verse-isntance-of