Re:The Two Pillars of JavaScript: Part 1: How to Escape the ...
by CmdrKrool on Saturday December 13, 2014 @10:51AM
(#8745395)
I'd love to stop using 'new' and embrace a more basic, less side-effect-laden and ultimately more flexible way of creating and returning objects in Javascript, such as Object.create(), object literal plus setting __proto__, or whatever. Unfortunately, all of these methods are still massively slower than 'new' - like, three to thirty times slower. (Sixty times, even, if you're on Safari!)
Since he mentioned HTML5 games and trying to improve perfomance by avoiding the garbage collector, well, the above benchmarks are not the kind of thing you would want to compromise on either.
http://jsperf.com/object-create-vs-crockford-vs-jorge-vs-con...
Since he mentioned HTML5 games and trying to improve perfomance by avoiding the garbage collector, well, the above benchmarks are not the kind of thing you would want to compromise on either.