Skip to content

update 'Collection.toArray()' call style to improve performance in JDK6+#9

Open
Khvatov-Alexey wants to merge 1 commit into
javaronok:ignite-2.15-compressionfrom
Khvatov-Alexey:ignite-2.15-compression
Open

update 'Collection.toArray()' call style to improve performance in JDK6+#9
Khvatov-Alexey wants to merge 1 commit into
javaronok:ignite-2.15-compressionfrom
Khvatov-Alexey:ignite-2.15-compression

Conversation

@Khvatov-Alexey

Copy link
Copy Markdown

The toArray(new T[0]) variant is faster than the toArray(new T[size]) and, therefore, should always be the preferred option when we have to convert a collection to an array.

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.

1 participant