PERF: Join non unique
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/v2.3.0.rst` file if fixing a bug or adding a new feature.

Seeing ~10% improvement when `how` is "left", "right", or "inner".

```
import pandas as pd 
import numpy as np

idx1 = pd.Index(np.tile(np.arange(1000), 1000))
idx2 = pd.Index(np.arange(100))

%timeit idx1.join(idx2, how="left")

# 103 ms ± 1.61 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> main
# 90.6 ms ± 504 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> PR
```
Thanks @lukemanley 