systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <>
Subject [jira] [Created] (SYSTEMML-2056) Adopt Collections.emptyList() for empty list values
Date Tue, 02 Jan 2018 04:43:00 GMT
Ted Yu created SYSTEMML-2056:

             Summary: Adopt Collections.emptyList() for empty list values
                 Key: SYSTEMML-2056
             Project: SystemML
          Issue Type: Improvement
            Reporter: Ted Yu
            Priority: Minor

Use Collection.emptyList() for returning an empty list instead of returning new ArrayList<>().

The default constructor creates a buffer of size 10 for ArrayList . Therefore, returning this
static value saves some memory and lessens GC pressure.

One candidate for replacement is in StatementBlock#mergeStatementBlocks

This message was sent by Atlassian JIRA

View raw message