baconjs/bacon.js — pull request #473 by lautis (2014-11-24 22:45:51+00:00)
Title: Extract non-optimisable parts from Dispatcher.pushIt

Using try-catch is [not optimisable on V8](http://jsperf.com/try-catch-block-performance-comparison) making Dispatcher.pushIt slower than it should be. However, if the try-finally block is in a separate function, the performance penalty can be mostly avoided.

```
*************** master **************
diamond x 168 ops/sec ±3.55% (82 runs sampled)
combo x 203 ops/sec ±4.23% (83 runs sampled)
zip x 3,880 ops/sec ±1.36% (92 runs sampled)
flatMap x 295 ops/sec ±4.20% (78 runs sampled)
Bacon.combineTemplate.sample x 723 ops/sec ±1.92% (89 runs sampled)
Bacon.combineTemplate (deep) x 36.72 ops/sec ±1.76% (66 runs sampled)
Bacon.combineTemplate x 471 ops/sec ±1.04% (88 runs sampled)
EventStream.map x 10,541 ops/sec ±1.19% (96 runs sampled)
EventStream.scan x 9,017 ops/sec ±0.66% (96 runs sampled)
EventStream.toProperty x 10,306 ops/sec ±1.23% (93 runs sampled)
*************** optimise-pushIt **************
diamond x 172 ops/sec ±2.78% (84 runs sampled)
combo x 203 ops/sec ±3.42% (84 runs sampled)
zip x 4,019 ops/sec ±1.59% (93 runs sampled)
flatMap x 354 ops/sec ±4.18% (78 runs sampled)
Bacon.combineTemplate.sample x 871 ops/sec ±2.54% (93 runs sampled)
Bacon.combineTemplate (deep) x 40.68 ops/sec ±0.83% (55 runs sampled)
Bacon.combineTemplate x 517 ops/sec ±1.35% (93 runs sampled)
EventStream.map x 12,371 ops/sec ±1.40% (94 runs sampled)
EventStream.scan x 10,776 ops/sec ±1.32% (95 runs sampled)
EventStream.toProperty x 12,360 ops/sec ±1.12% (96 runs sampled)
```