Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Benchmark X-Map-Z operators #5914

Merged
merged 1 commit into from
Mar 14, 2018
Merged

Conversation

akarnokd
Copy link
Member

This PR adds JMH benchmarks to measure operators mapping onto other types, such as flatMapCompletable, concatMapSingle, etc. In addition, two new benchmarks were added to measure the flatMapIterable performance in additional situations.

Baseline results

i7 4770K, Windows 7 x64, Java 8u162

JMH Compare GUI workspace file: xmapz_ws.xml

The first diagram compares the dedicated, plain (same inner type as the outer type) and conversion-based flows:

image

The switchMap-based Observable operators look like they could use some optimizations. Overall, count == 1 is not optimized with the dedicated versions.

From the Observable's perspective:

image

Looks like the concatMapX operators could use some optimizations.

The flatMapIterable measures are as follows:

image

The Flowable version seem to be considerably slower, probably not explainable due to backpressure overhead.

@akarnokd akarnokd added this to the 2.2 milestone Mar 14, 2018
@codecov
Copy link

codecov bot commented Mar 14, 2018

Codecov Report

❗ No coverage uploaded for pull request base (2.x@90bca55). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             2.x    #5914   +/-   ##
======================================
  Coverage       ?   98.19%           
  Complexity     ?     5996           
======================================
  Files          ?      655           
  Lines          ?    43927           
  Branches       ?     6084           
======================================
  Hits           ?    43134           
  Misses         ?      242           
  Partials       ?      551

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90bca55...2cc8e7c. Read the comment docs.

@akarnokd akarnokd merged commit 4bc516c into ReactiveX:2.x Mar 14, 2018
@akarnokd akarnokd deleted the PerfMeasures0314 branch March 14, 2018 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants