On Mon, 8 Apr 2024 16:47:24 GMT, Paul Sandoz <psan...@openjdk.org> wrote:

> > @PaulSandoz @AlanBateman I've added a commit to this PR which removes the 
> > use of Gatherer for Stream::flatMap, but instead implements flatMap for all 
> > of the pipelines using the same encoding which Gatherer would use. It seems 
> > very competitive performance-wise, and resolves at least one open JBS-issue 
> > with flatMap (will look to see if it resolves more than that)
> 
> That's a rather clever use of `allMatch`!

Thank you :)

> 
> Did you observe performance improvements using `@Stable` on the `cancel` 
> field? It's really hard to predict in the abstract (since the default value 
> of the field will be read in proportion to the number of elements until the 
> stream is cancelled).

I'm currently exploring some different venues for optimization. Stay tuned :)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18625#issuecomment-2043559783

Reply via email to