code: @Override
    public FastSet union(IntSet other)
    {
      if (other == null || other.isEmpty() || this == other) {
        return clone();
      }
  
      final FastSet o = convert(other);
      if (isEmpty()) {
        return o.clone();
      }
  
      FastSet res = new FastSet(Math.max(firstEmptyWord, o.firstEmptyWord));
      res.firstEmptyWord = res.words.length;
      final int wordsInCommon = Math.min(firstEmptyWord, o.firstEmptyWord);
  
      final int[] localWords = words;     // faster
      final int[] localOtherWords = o.words;   // faster
      final int[] localResWords = res.words;   // faster
  
      for (int i = 0; i < wordsInCommon; i++) {
        localResWords[i] = localWords[i] | localOtherWords[i];
      }
  
      if (wordsInCommon < firstEmptyWord) {
        System.arraycopy(
            localWords, wordsInCommon, localResWords, wordsInCommon,
            res.firstEmptyWord - wordsInCommon
        );
      }
      if (wordsInCommon < o.firstEmptyWord) {
        System.arraycopy(
            localOtherWords, wordsInCommon, localResWords, wordsInCommon,
            res.firstEmptyWord - wordsInCommon
        );
      }
      res.size = -1;
      return res;
    }
docs: {@inheritDoc}