You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/12/19 01:31:52 UTC

[GitHub] [groovy] paulk-asert commented on pull request #1444: GROOVY-9865: Add some DGM methods for primitive arrays

paulk-asert commented on pull request #1444:
URL: https://github.com/apache/groovy/pull/1444#issuecomment-748398454


   Yes, boxed streams are already covered. Possibly an unboxed variant, e.g. intStream(int[]), would also be useful.
   
   As to using the stream-based max, we could certainly consider that. For small arrays the overheads of setting up the stream would be slower than the current implementation. For large streams, there might be a gain. I am inclined to leave as is and make it easy for folks to do that themselves. If we had something like `intStream()` they could choose between `nums.max()`, `nums.intStream().max().asInt`, and `nums.intStream().parallel().max().asInt` as they felt appropriate.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org