Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15084#discussion_r78716318
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/BitSet.scala 
---
    @@ -58,6 +58,20 @@ class BitSet(numBits: Int) extends Serializable {
       }
     
       /**
    +   * Clear all the bits up to a given index
    +   */
    +  def clearUntil(bitIndex: Int) {
    +    val wordIndex = bitIndex >> 6 // divide by 64
    +    var i = 0
    +    while(i < wordIndex) { words(i) = 0; i += 1 }
    --- End diff --
    
    java.util.Arrays.fill can do this in one line. It won't be faster but could 
be a tiny bit cleaner. Up to your taste whether you want to change this and 
other occurrences in the file.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to