Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Resolves #8114.

@adamgfraser adamgfraser requested a review from jdegoes May 13, 2023 23:33
@jdegoes jdegoes merged commit 68cc8b8 into zio:series/2.x May 14, 2023
@jdegoes
Copy link
Member

jdegoes commented May 14, 2023

I think toArray[Any] will box the values. So that could be improved. Otherwise, however, looks great!

@adamgfraser adamgfraser deleted the 8114 branch May 14, 2023 19:34
@adamgfraser
Copy link
Contributor Author

It will box the values but Java doesn't provide an implementation of sorting an array that accepts an arbitrary comparison function and doesn't box values. I don't think we can do better in the general case without doing our own implementation of sorting algorithms, which doesn't seem like the greatest, but we could match on the Ordering and use the specialized sorted on primitive arrays if it is the default ordering.

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.

Specialize Chunk.sorted

2 participants