You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Carsten Hammer (JIRA)" <ji...@apache.org> on 2019/08/11 18:50:00 UTC
[jira] [Created] (NETBEANS-2972) inspect and transform contains
wrong refactoring "passing zero element array.."
Carsten Hammer created NETBEANS-2972:
----------------------------------------
Summary: inspect and transform contains wrong refactoring "passing zero element array.."
Key: NETBEANS-2972
URL: https://issues.apache.org/jira/browse/NETBEANS-2972
Project: NetBeans
Issue Type: Bug
Reporter: Carsten Hammer
"Passing zero element array to Collection.toArray may affect performance"
This refactoring decreases performance according to [https://shipilev.net/blog/2016/arrays-wisdom-ancients/]
On recent VMs, collection.toArray(new T[0]) is faster than collection.toArray(new T[collection.size()]). Since it is also more readable, it should now be the preferred way of collection to array conversion.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists