Optimize the happy path in parXOrAccumulate#3370
Conversation
Kover Report
|
|
This is all a bit magical to me, but let's start with some concrete questions: is it possible to make |
|
Is this better? I hid The idea is to use a union type |
|
I'm a bit confused on the optimisation 🤔 To me initially it even seems that this is actually resulting in more allocations, or other performance implications. I'm fine with a I'm always a bit hesitant about performance improvements, unless it's extremely obvious like an I need to take a proper look at the code though, could you elaborate a bit your train of thought of the optimisation @kyay10? I think if we do decide to merge these, or similar changes, we need to document the optimisation similar as I read when studying the KotlinX Coroutines documentation. |
|
For sure, let me clarify. When using our |
|
@kyay10 I labeled this as 2.0.0. We should move 2.0.0 into main asap, such that we can do a Beta/RC1 release. |
|
Yep, that's fine! I will rebase/merge right when |
|
Closed in favour of #3408 or perhaps a |
This is done by wrapping raised values in a
FailureValue, and values of that class are never leaked outside, hence it always denotes that a value was raised.