wu-sheng commented on a change in pull request #2776: Added minor performance
improvements
URL: https://github.com/apache/skywalking/pull/2776#discussion_r288125993
##########
File path:
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/CollectionUtils.java
##########
@@ -26,15 +26,15 @@
public class CollectionUtils {
public static boolean isEmpty(Map map) {
- return map == null || map.size() == 0;
+ return map == null || map.isEmpty();
Review comment:
In most list, `isEmpty` == `size() == 0`. Could you give me some benchmark
to indicate this will improve performance?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services