Ember Object creation vs plain JS object


I came across this site http://jsperf.com/ember-object-creation-vs-plain-js-object.

performed on below settings:

https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0/ember.min.js

The below is the result from firefox browers.


Those tests are against Ember 1.0.0, here is a more relevant fork and the numbers should increase about 40%-70% higher. I also removed the CP for fairness between the tests.



GlimmerObject should substantially move the needle here, but there will always be a substantial overhead to using Ember.Object because of the complexity involved. This is a fun perf comparison to see if what you are doing involves creating lots of small specialized objects, it shows you that if you don’t need Ember.Object for a hot code path you are better off building your own thing, but you’d have to implement getters, setters, computeds, and mixins to create an honest head to head.