batmanjs/batman — pull request #913 by pushrax (2013-11-26 05:14:48+00:00)
Title: Use a simple closure rather than a bind in sourceChangeHandler

I made [a benchmark](https://gist.github.com/pushrax/7653771) for trying to improve a specific performance issue in Shopify. It led me to finding this random little case that's actually a fairly significant detriment to deserialization speed.

Since we don't have a working performance test suite at the moment, I manually did 12 trials with each version (interspersed with each other to prevent bias). Vertical axis is deserialization time in ms, left is old and right is new.

![screen shot 2013-11-26 at 12 05 17 am](https://f.cloud.github.com/assets/984857/1619474/726de8b2-5658-11e3-9dca-4e320be44dda.png)

Evaluated like so:
![screen shot 2013-11-26 at 12 08 07 am](https://f.cloud.github.com/assets/984857/1619483/d2082c24-5658-11e3-9653-7d2d36246fb1.png)

(deleted profiles were from me screwing up the test order, forgetting to refresh etc)

Raw data:
```r
new <- c(322, 357, 359, 363, 369, 366, 381, 365, 328, 362, 348, 325)
old <- c(484, 439, 533, 464, 510, 464, 422, 439, 428, 485, 466, 494)
boxplot(old, new, ylim=c(0, 600))
```

All I can say is "lol"