Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

CompositeSubscription performance increase#819

Merged
benjchristensen merged 1 commit intoReactiveX:masterfrom
akarnokd:CompositeSubscriptionPerf4
Feb 5, 2014
Merged

CompositeSubscription performance increase#819
benjchristensen merged 1 commit intoReactiveX:masterfrom
akarnokd:CompositeSubscriptionPerf4

Conversation

@akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 5, 2014

  • Optimized the case when the composite holds only a single element.
  • Replaced Arrays.copyOf with regular arraycopy to avoid the cost of reflective array creation
  • Included perf test where I got 32% increase on my i7 4770K

@cloudbees-pull-request-builder

RxJava-pull-requests #739 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

The things we do for performance :-)

Very nice changes.

Old code on my machine:

Run: 10 - 14,477,981 ops/sec
Run: 11 - 14,028,905 ops/sec
Run: 12 - 14,738,523 ops/sec
Run: 13 - 14,296,743 ops/sec
Run: 14 - 14,643,646 ops/sec

New code:

Run: 10 - 20,500,289 ops/sec
Run: 11 - 19,725,110 ops/sec
Run: 12 - 20,433,601 ops/sec
Run: 13 - 19,659,111 ops/sec
Run: 14 - 20,011,446 ops/sec

benjchristensen added a commit that referenced this pull request Feb 5, 2014
CompositeSubscription performance increase
@benjchristensen benjchristensen merged commit b521d18 into ReactiveX:master Feb 5, 2014
@headinthebox
Copy link
Contributor

Like!

@akarnokd akarnokd deleted the CompositeSubscriptionPerf4 branch May 6, 2014 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants