Netflix/RxJava — pull request #1172 by akarnokd (2014-05-08 14:54:00+00:00)
Title: Change to batch dequeue.

Using the same batch technique as in ```SerializedObserver``` to dequeue and play values. I had to switch to synchronized because ```ConcurrentLinkedQueue``` doesn't support drain.

I run the scheduler perf test with it:
```
Result : 1913,582 ±(99.9%) 29,210 ns/op
Statistics: (min, avg, max) = (1905,303, 1913,582, 1922,427), stdev = 7,586
Confidence interval (99.9%): [1884,373, 1942,792]

Result : 64.277,546 ±(99.9%) 734,360 ns/op
Statistics: (min, avg, max) = (64034,953, 64277,546, 64519,884), stdev = 190,711
Confidence interval (99.9%): [63543,186, 65011,906]

Result : 67.999.392,293 ±(99.9%) 4715885,625 ns/op
Statistics: (min, avg, max) = (66777535,133, 67999392,293, 69525773,000), stdev = 1224700,521
Confidence interval (99.9%): [63283506,668, 72715277,918]
```

Master for me was 1863,423 / 119.030,536 / 127.738.858,250

Appears to be a 2x speedup on 1024 and 1M items.