[ https://issues.apache.org/jira/browse/HDFS-15786?focusedWorklogId=540345&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-540345 ]
ASF GitHub Bot logged work on HDFS-15786: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Jan/21 21:19 Start Date: 22/Jan/21 21:19 Worklog Time Spent: 10m Work Description: arturobernalg opened a new pull request #2641: URL: https://github.com/apache/hadoop/pull/2641 Use isEmpty instead size() > o. size() can be O(1) or O(N), depending on the data structure; .isEmpty() is never O(N). ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 540345) Remaining Estimate: 0h Time Spent: 10m > Minor improvement use isEmpty > ----------------------------- > > Key: HDFS-15786 > URL: https://issues.apache.org/jira/browse/HDFS-15786 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Arturo Bernal > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > Use isEmpty instead size() > o. > > {{size()}} can be *O(1)* or *O(N)*, depending on the {{data structure}}; > {{.isEmpty()}} is never *O(N)*. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org