Shopify/batman — pull request #704 by hornairs (2013-05-09 19:28:10+00:00)
Title: Bindings are their own underscore batman

@kristianpd @nickjs @ibawt

So I wanted to try something to reduce object allocations during rendering: instead of `Binding` being a full fledged `Batman.Object`, it is both a `Batman.Object` and the `_batman` at the same time. This is cool cause it lets us not need the `_batman` object on each binding, or the objects to store and namespace `events` and `properties` on that `_batman`.

I created a new class called `InternalObject` which uses the object itself to store events and properties on and tested out some loop benchmarks with it, but weirdly, it's slower in a number of browsers! These results have this branch in the light blue and master in the dark blue, and the speed seems to be faster on master. Weird.

![screen shot 2013-05-09 at 3 25 40 pm](https://f.cloud.github.com/assets/158950/484647/45b22ef4-b8de-11e2-95af-e20a398381dc.png)
![screen shot 2013-05-09 at 3 25 34 pm](https://f.cloud.github.com/assets/158950/484648/45b9bea8-b8de-11e2-8ccb-17dd15350c60.png)
![screen shot 2013-05-09 at 3 25 20 pm](https://f.cloud.github.com/assets/158950/484649/45c6b478-b8de-11e2-975a-7bdcd650fd0f.png)

So thoughts on this approach? Should I just ditch it? Does anyone see why this might be slower for a dumb reason?