David Ernst A personal site

Profiling Object Instantiation

For Hack Reactor, we were asked to create Stack and Queue data-structures, and then to instantiate them in different ways: a functional style, a functional-shared style (where methods are shared in memory), a prototypal style, and a pseudoclassical style.

Andy Coenen and I then profiled the different methods to investigate their comparative speeds.

Here are our results – lower bars are quicker:

See the numbers here: Instantiation Method Testing

Thanks to Hack Reactor for helping us along the way.