code: public static int fastHashInsertOnly(final WritableMemory wmem, final int lgArrLongs,
        final long hash, final int memOffsetBytes) {
      final int arrayMask = (1 << lgArrLongs) - 1; // current Size -1
      final int stride = getStride(hash, lgArrLongs);
      int curProbe = (int) (hash & arrayMask);
      // search for duplicate or zero
      final int loopIndex = curProbe;
      do {
        final int curProbeOffsetBytes = (curProbe << 3) + memOffsetBytes;
        final long curArrayHash = wmem.getLong(curProbeOffsetBytes);
        if (curArrayHash == EMPTY) {
          wmem.putLong(curProbeOffsetBytes, hash);
          return curProbe;
        }
        curProbe = (curProbe + stride) & arrayMask;
      } while (curProbe != loopIndex);
      throw new SketchesArgumentException("No empty slot in table!");
    }
docs: This is a classical Knuth-style Open Addressing, Double Hash insert scheme, but inserts
  values directly into a Memory.
  This method assumes that the input hash is not a duplicate.
  Useful for rebuilding tables to avoid unnecessary comparisons.
  Returns the index of insertion, which is always positive or zero.
  Throws an exception if table has no empty slot.
  
  @param wmem The writable memory
  @param lgArrLongs <a href="{@docRoot}/resources/dictionary.html#lgArrLongs">See lgArrLongs</a>.
  lgArrLongs &le; log2(hashTable.length).
  @param hash value that must not be zero and will be inserted into the array into an empty slot.
  @param memOffsetBytes offset in the memory where the hash array starts
  @return index of insertion.  Always positive or zero.