code: public void add(Composite start, Composite end, long markedAt, int delTime)
      {
          if (isEmpty())
          {
              addInternal(0, start, end, markedAt, delTime);
              return;
          }
  
          int c = comparator.compare(ends[size-1], start);
  
          // Fast path if we add in sorted order
          if (c <= 0)
          {
              addInternal(size, start, end, markedAt, delTime);
          }
          else
          {
              // Note: insertFrom expect i to be the insertion point in term of interval ends
              int pos = Arrays.binarySearch(ends, 0, size, start, comparator);
              insertFrom((pos >= 0 ? pos : -pos-1), start, end, markedAt, delTime);
          }
          boundaryHeapSize += start.unsharedHeapSize() + end.unsharedHeapSize();
      }
docs: Adds a new range tombstone.
  
  This method will be faster if the new tombstone sort after all the currently existing ones (this is a common use case),
  but it doesn't assume it.