Fix makeIntIndex, benchmark get loc
State: closed

- [x] tests passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

``makeIntIndex`` currently produces a monotonic index, and hence tests common to different classes actually test very different things (i.e. the sorted vs. unsorted code paths). I had to fix this (and to fix the tests which erroneously relied on the specific content of ``makeIntIndex(k)``) in order to add meaningful performance tests for ``get_loc``.


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Performance
description: Memory or execution speed performance

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=h1) Report
> Merging [#19483](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/4eb0cec404cdf468baf55038c2d34a0665d2ae4f?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19483/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19483      +/-   ##
==========================================
- Coverage   91.67%   91.67%   -0.01%     
==========================================
  Files         148      148              
  Lines       48543    48541       -2     
==========================================
- Hits        44502    44499       -3     
- Misses       4041     4042       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.03% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.71% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19483/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.64% <100%> (-0.21%)` | :arrow_down: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/19483/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `95.06% <0%> (-0.09%)` | :arrow_down: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/19483/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.32% <0%> (ø)` | :arrow_up: |
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/19483/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `96.97% <0%> (+0.62%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=footer). Last update [4eb0cec...51d6911](https://codecov.io/gh/pandas-dev/pandas/pull/19483?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback You realize that the asv test is broken in that it never tests unsorted ``Int64Index``, yeah?
and that change should be in the asv itself


fine
@jreback if you make changes to a PR before merging (which is OK, I also do that from time to time), please push to this branch on github and merge here, otherwise it is really un-transparent to see what has been merged (the merge script has even an option to do this).