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

Add Publisher.from(..) 2 and 3 arity overloads #1432

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

Scottmitch
Copy link
Member

Motivation:
Publisher.from(..) with 2 or 3 arguments is becoming more common in
control flow, and we currently have to allocate an array in these
scenarios. Specialized implementations for this operator can avoid array
allocation and more complex index/state management.

Modifications:

  • Add Publisher.from(T, T) and Publisher.from(T, T, T)

Result:
Publisher.from(..) is less resource intensive for 2 and 3 arity use
cases.

Motivation:
Publisher.from(..) with 2 or 3 arguments is becoming more common in
control flow, and we currently have to allocate an array in these
scenarios. Specialized implementations for this operator can avoid array
allocation and more complex index/state management.

Modifications:
- Add Publisher.from(T, T) and Publisher.from(T, T, T)

Result:
Publisher.from(..) is less resource intensive for 2 and 3 arity use
cases.
@Scottmitch
Copy link
Member Author

build failure attributed to #1277

@Scottmitch Scottmitch merged commit 0585f9f into apple:main Mar 15, 2021
@Scottmitch Scottmitch deleted the publisher_from branch March 15, 2021 19:10
@idelpivnitskiy
Copy link
Member

LGTM, submitted #1439 for the javadoc typo

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.

3 participants