Netflix/RxJava — pull request #1236 by akarnokd (2014-05-21 12:34:23+00:00)
Title: CompositeSubscription with atomic field updater

This PR is aimed at #1204 to reduce unnecessary memory overhead in frequently used classes. This change in ```CompositeSubscription``` saves about 24 bytes per instance.

In addition, the field updaters may be faster by about 8-15% for small adds and removals. I've changed the implementation of unsubscribe to use getAndSet which leverages platform intrinsics and is usually compiled to a single instruction: this makes unsubscribing a tiny bit faster and thus reducing latency in benchmarks that only pass on single element around.