PERF: Do not init cache in RangeIndex.take
State: closed

Improve performance when passing an array to RangeIndex.take, DataFrame.loc, or DataFrame.iloc and the DataFrame is using a RangeIndex

- [x] closes #53387
- [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/vX.X.X.rst` file if fixing a bug or adding a new feature.


Performance test:
```python
import numpy as np
import pandas as pd

print(f"index creation")
%timeit pd.RangeIndex(100_000_000)

indices = [90_000_000]
print(f"{len(indices)=}, index creation + first execution")
%timeit pd.RangeIndex(100_000_000).take([90_000_000])

print()
ind = pd.RangeIndex(100_000_000)
indices = np.array([90_000_000])
print(f"{len(indices)=}, first execution")
%time ind.take(indices)
print(f"{len(indices)=}, other executions")
%timeit ind.take(indices)

print()
ind = pd.RangeIndex(100_000_000)
rng = np.random.default_rng(0)
indices = rng.integers(0, 100_000_000, 1_000_000)
print(f"{len(indices)=}, first execution")
%time ind.take(indices)
print(f"{len(indices)=}, other executions")
%timeit ind.take(indices)
```

Output (pandas 2.0.1):
```
index creation
3.58 µs ± 9.11 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
len(indices)=1, index creation + first execution
204 ms ± 41.2 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)

len(indices)=1, first execution
CPU times: user 54.9 ms, sys: 147 ms, total: 202 ms
Wall time: 202 ms
len(indices)=1, other executions
3.79 µs ± 21.6 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

len(indices)=1000000, first execution
CPU times: user 80.4 ms, sys: 155 ms, total: 236 ms
Wall time: 236 ms
len(indices)=1000000, other executions
28.2 ms ± 193 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

Output (this PR):
```
index creation
3.54 µs ± 15.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
len(indices)=1, index creation + first execution
14.6 µs ± 53.9 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

len(indices)=1, first execution
CPU times: user 38 µs, sys: 0 ns, total: 38 µs
Wall time: 41.5 µs
len(indices)=1, other executions
7.96 µs ± 16.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

len(indices)=1000000, first execution
CPU times: user 2.92 ms, sys: 1.99 ms, total: 4.91 ms
Wall time: 4.93 ms
len(indices)=1000000, other executions
2.17 ms ± 277 ns per loop (mean ± std. dev. of 7 runs, 100 loops each)
```


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Performance
description: Memory or execution speed performance
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Couple questions, otherwise LGTM
> Couple questions, otherwise LGTM

Thanks, I've answered all the pending questions.
thanks @GianlucaFicarelli