PERF: get_dummies
- [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.2.0.rst` file if fixing a bug or adding a new feature.

```
from asv_bench.benchmarks.reshape import GetDummies

b = GetDummies()
b.setup()

%timeit b.time_get_dummies_1d()

# 106 ms ± 4.77 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  <- main
# 17 ms ± 1.58 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)   <- PR
```
Nice thanks @lukemanley 