Working with Graphs & Trees

What optimization techniques are implemented in this Union-Find data structure?
class DisjointSet {
  constructor() {
    this.parent = {};
    this.rank = {};
  }
  
  makeSet(x) {
    this.parent[x] = x;
    this.rank[x] = 0;
  }
  
  find(x) {
    if (this.parent[x] !== x) {
      this.parent[x] = this.find(this.parent[x]);
    }
    return this.parent[x];
  }
  
  union(x, y) {
    const rootX = this.find(x);
    const rootY = this.find(y);
    if (rootX === rootY) return;
    
    if (this.rank[rootX] < this.rank[rootY]) {
      this.parent[rootX] = rootY;
    } else if (this.rank[rootX] > this.rank[rootY]) {
      this.parent[rootY] = rootX;
    } else {
      this.parent[rootY] = rootX;
      this.rank[rootX]++;
    }
  }
}
Next Question (14/21)