News for hackers. Stuff that matters.
Re:Backbone vs. Simple JavaScript Inheritance by cdata on Saturday June 01, 2013 @06:07PM (#5806204)
Backbone's 'extend' is portable to non-Backbone classes[1]. It would be more interesting to see the performance profile comparison of Backbone and Resig implementations of extend when used to inherit from the same class (either an empty class, or a Backbone class).

[1] https://github.com/documentcloud/backbone/blob/master/backbo...

Re:Backbone vs. Simple JavaScript Inheritance by reissbaker on Saturday June 01, 2013 @06:11PM (#5806222)
I was also bothered by the fact that the two were instantiating very different objects, so I forked the tests and added a new case that uses Backbone's portable extend method to create vanilla objects: http://jsperf.com/backbone-vs-john-resig-class/5

TL;DR: the Backbone approach has similar performance characteristics compared to Resig's when instantiating similar objects. In some browsers (Firefox Nightly, Safari), Backbone's approach is significantly faster. It's also compatible with strict mode — although Backbone itself doesn't use strict mode — whereas Resig's uses arguments.callee which will throw errors.