You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2021/07/09 16:46:00 UTC

[jira] [Updated] (ORC-841) Remove Superfluous Array Fill in StringHashTableDictionary

     [ https://issues.apache.org/jira/browse/ORC-841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Mollitor updated ORC-841:
-------------------------------
    Description: 
{code:java|title=StringHashTableDictionary.java}
  private void doResize(int newCapacity, int oldCapacity) {
    // ...
    Arrays.fill(hashBuckets, null);
    hashBuckets = resizedHashBuckets;
  }
{code}

No need to waste time to null-out of {{hashBuckets}}.  {{hashBuckets}} is overwritten and the Java GC will clean it up, and by extension, all of its elements.

  was:
{code:java|title=StringHashTableDictionary.java}
  private void doResize(int newCapacity, int oldCapacity) {
    // ...
    Arrays.fill(hashBuckets, null);
    hashBuckets = resizedHashBuckets;
  }
{code}

No need to waste time null-out of {{hashBuckets}}.  {{hashBuckets}} is overwritten and the Java GC will clean it up, and by extension, all of its elements.


> Remove Superfluous Array Fill in StringHashTableDictionary
> ----------------------------------------------------------
>
>                 Key: ORC-841
>                 URL: https://issues.apache.org/jira/browse/ORC-841
>             Project: ORC
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>
> {code:java|title=StringHashTableDictionary.java}
>   private void doResize(int newCapacity, int oldCapacity) {
>     // ...
>     Arrays.fill(hashBuckets, null);
>     hashBuckets = resizedHashBuckets;
>   }
> {code}
> No need to waste time to null-out of {{hashBuckets}}.  {{hashBuckets}} is overwritten and the Java GC will clean it up, and by extension, all of its elements.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)