CLN: ASV  index_object benchmark
State: closed

- Remove star imports and flake8 checked

- Moved some index constructor benchmarks to `ctors.py` (probably should rename this file in the future)

- Moved some index indexing benchmarks to `indexing.py`

```
asv dev -b ^index_object
· Discovering benchmarks
· Running 32 total benchmarks (1 commits * 1 environments * 32 benchmarks)
[  0.00%] ·· Building for existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[  0.00%] ·· Benchmarking existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[  0.00%] ··· Setting up /home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/index_object.py:160
[  3.12%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_copy                     30.1ms
[  6.25%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_sliced                    544μs
[  9.38%] ··· Running index_object.Datetime.time_is_dates_only                                           357μs
[ 12.50%] ··· Running index_object.Duplicated.time_duplicated                                            228ms
[ 15.62%] ··· Running index_object.IndexAppend.time_append_int_list                                      285ms
[ 18.75%] ··· Running index_object.IndexAppend.time_append_obj_list                                      299ms
[ 21.88%] ··· Running index_object.IndexAppend.time_append_range_list                                    310ms
[ 25.00%] ··· Running index_object.Ops.time_add                                                             ok
[ 25.00%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   6.22ms 
                 int    5.53ms 
               ======= ========

[ 28.12%] ··· Running index_object.Ops.time_divide                                                          ok
[ 28.12%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.59ms 
                 int    20.7ms 
               ======= ========

[ 31.25%] ··· Running index_object.Ops.time_modulo                                                          ok
[ 31.25%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   15.8ms 
                 int    19.1ms 
               ======= ========

[ 34.38%] ··· Running index_object.Ops.time_multiply                                                        ok
[ 34.38%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.55ms 
                 int    5.82ms 
               ======= ========

[ 37.50%] ··· Running index_object.Ops.time_subtract                                                        ok
[ 37.50%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.53ms 
                 int    5.51ms 
               ======= ========

[ 40.62%] ··· Running index_object.Range.time_max                                                       65.6ms
[ 43.75%] ··· Running index_object.Range.time_max_trivial                                               61.5ms
[ 46.88%] ··· Running index_object.Range.time_min                                                       62.4ms
[ 50.00%] ··· Running index_object.Range.time_min_trivial                                               63.3ms
[ 53.12%] ··· Running index_object.SetOperations.time_datetime_difference                               14.2ms
[ 56.25%] ··· Running index_object.SetOperations.time_datetime_difference_disjoint                      8.42ms
[ 59.38%] ··· Running index_object.SetOperations.time_datetime_intersection                             1.35ms
[ 62.50%] ··· Running index_object.SetOperations.time_datetime_symmetric_difference                     18.5ms
[ 65.62%] ··· Running index_object.SetOperations.time_datetime_union                                     895μs
[ 68.75%] ··· Running index_object.SetOperations.time_index_datetime_intersection                       6.96ms
[ 71.88%] ··· Running index_object.SetOperations.time_index_datetime_union                              6.91ms
[ 75.00%] ··· Running index_object.SetOperations.time_int64_difference                                  13.6ms
[ 78.12%] ··· Running index_object.SetOperations.time_int64_intersection                                6.33ms
[ 81.25%] ··· Running index_object.SetOperations.time_int64_symmetric_difference                        20.0ms
[ 84.38%] ··· Running index_object.SetOperations.time_int64_union                                       12.1ms
[ 87.50%] ··· Running index_object.SetOperations.time_str_difference                                    6.12ms
[ 90.62%] ··· Running index_object.SetOperations.time_str_symmetric_difference                          11.8ms
[ 93.75%] ··· Running index_object.Sortlevel.time_sortlevel_int64                                        775ms
[ 96.88%] ··· Running index_object.Sortlevel.time_sortlevel_one                                         18.2ms
[100.00%] ··· Running index_object.Sortlevel.time_sortlevel_zero                                        20.5ms
```

Labels:
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
Hello @mroeschke! Thanks for updating the PR.







Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on December 24, 2017 at 06:27 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18758?src=pr&el=h1) Report
> Merging [#18758](https://codecov.io/gh/pandas-dev/pandas/pull/18758?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/cdebcf374598e9141df7dc23bc75c9528e92c004?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18758      +/-   ##
==========================================
- Coverage   91.59%   91.57%   -0.03%     
==========================================
  Files         150      150              
  Lines       48959    48959              
==========================================
- Hits        44843    44833      -10     
- Misses       4116     4126      +10
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.93% <ø> (-0.03%)` | :arrow_down: |
| #single | `41.13% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18758?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18758/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/18758/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `84.9% <0%> (+0.21%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18758?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/18758?src=pr&el=footer). Last update [cdebcf3...add0d71](https://codecov.io/gh/pandas-dev/pandas/pull/18758?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Parametrized the `SetOperations` benchmark and standarized the inputs a little more.

```
asv dev -b ^index_object
· Discovering benchmarks
· Running 21 total benchmarks (1 commits * 1 environments * 21 benchmarks)
[  0.00%] ·· Building for existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[  0.00%] ·· Benchmarking existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[  0.00%] ··· Setting up /home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/index_object.py:132
[  4.76%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_copy                                     25.5ms
[  9.52%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_sliced                                    569μs
[ 14.29%] ··· Running index_object.Datetime.time_is_dates_only                                                           359μs
[ 19.05%] ··· Running index_object.Duplicated.time_duplicated                                                            200ms
[ 23.81%] ··· Running index_object.IndexAppend.time_append_int_list                                                      286ms
[ 28.57%] ··· Running index_object.IndexAppend.time_append_obj_list                                                      301ms
[ 33.33%] ··· Running index_object.IndexAppend.time_append_range_list                                                    301ms
[ 38.10%] ··· Running index_object.Ops.time_add                                                                             ok
[ 38.10%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.47ms 
                 int    5.42ms 
               ======= ========

[ 42.86%] ··· Running index_object.Ops.time_divide                                                                          ok
[ 42.86%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.49ms 
                 int    20.6ms 
               ======= ========

[ 47.62%] ··· Running index_object.Ops.time_modulo                                                                          ok
[ 47.62%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   15.8ms 
                 int    19.1ms 
               ======= ========

[ 52.38%] ··· Running index_object.Ops.time_multiply                                                                        ok
[ 52.38%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.51ms 
                 int    5.63ms 
               ======= ========

[ 57.14%] ··· Running index_object.Ops.time_subtract                                                                        ok
[ 57.14%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.45ms 
                 int    7.11ms 
               ======= ========

[ 61.90%] ··· Running index_object.Range.time_max                                                                       73.6ms
[ 66.67%] ··· Running index_object.Range.time_max_trivial                                                               78.6ms
[ 71.43%] ··· Running index_object.Range.time_min                                                                       77.0ms
[ 76.19%] ··· Running index_object.Range.time_min_trivial                                                               77.1ms
[ 80.95%] ··· Running index_object.SetDisjoint.time_datetime_difference_disjoint                                        10.4ms
[ 85.71%] ··· Running index_object.SetOperations.time_operation                                                             ok
[ 85.71%] ···· 
               ============= ============== ======== ======================
               --                                method                    
               ------------- ----------------------------------------------
                   dtype      intersection   union    symmetric_difference 
               ============= ============== ======== ======================
                  datetime       7.12ms      6.45ms          41.3ms        
                date_string      73.6ms      77.9ms          163ms         
                    int          3.33ms      2.74ms          21.8ms        
                  strings        66.0ms      246ms           89.6ms        
               ============= ============== ======== ======================

[ 90.48%] ··· Running index_object.Sortlevel.time_sortlevel_int64                                                        775ms
[ 95.24%] ··· Running index_object.Sortlevel.time_sortlevel_one                                                         18.2ms
[100.00%] ··· Running index_object.Sortlevel.time_sortlevel_zero                                                        18.6ms
```
@jorisvandenbossche consolidated those index indexing benchmarks back to `index_object.py`

```
asv dev -b ^index_object
[  0.00%] ··· Setting up /home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/index_object.py:133
[  3.85%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_copy                                       25.7ms
[  7.69%] ··· Running index_object.MultiIndexValues.time_datetime_level_values_sliced                                      531μs
[ 11.54%] ··· Running index_object.Datetime.time_is_dates_only                                                             361μs
[ 15.38%] ··· Running index_object.Duplicated.time_duplicated                                                              196ms
[ 19.23%] ··· Running index_object.IndexAppend.time_append_int_list                                                        285ms
[ 23.08%] ··· Running index_object.IndexAppend.time_append_obj_list                                                        303ms
[ 26.92%] ··· Running index_object.IndexAppend.time_append_range_list                                                      300ms
[ 30.77%] ··· Running index_object.Indexing.time_boolean_array                                                                ok
[ 30.77%] ···· 
               ======== ========
                dtype           
               -------- --------
                String   35.1ms 
                Float    7.03ms 
                 Int     6.96ms 
               ======== ========

[ 34.62%] ··· Running index_object.Indexing.time_boolean_series                                                               ok
[ 34.62%] ···· 
               ======== ========
                dtype           
               -------- --------
                String   35.1ms 
                Float    7.29ms 
                 Int     7.00ms 
               ======== ========

[ 38.46%] ··· Running index_object.Indexing.time_get                                                                          ok
[ 38.46%] ···· 
               ======== ========
                dtype           
               -------- --------
                String   26.4μs 
                Float    27.8μs 
                 Int     27.4μs 
               ======== ========

[ 42.31%] ··· Running index_object.Indexing.time_slice                                                                        ok
[ 42.31%] ···· 
               ======== ========
                dtype           
               -------- --------
                String   55.7μs 
                Float    54.8μs 
                 Int     56.5μs 
               ======== ========

[ 46.15%] ··· Running index_object.Indexing.time_slice_step                                                                   ok
[ 46.15%] ···· 
               ======== ========
                dtype           
               -------- --------
                String   69.7μs 
                Float    54.0μs 
                 Int     56.7μs 
               ======== ========

[ 50.00%] ··· Running index_object.Ops.time_add                                                                               ok
[ 50.00%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.51ms 
                 int    5.48ms 
               ======= ========

[ 53.85%] ··· Running index_object.Ops.time_divide                                                                            ok
[ 53.85%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.55ms 
                 int    20.6ms 
               ======= ========

[ 57.69%] ··· Running index_object.Ops.time_modulo                                                                            ok
[ 57.69%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   15.8ms 
                 int    19.1ms 
               ======= ========

[ 61.54%] ··· Running index_object.Ops.time_multiply                                                                          ok
[ 61.54%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.36ms 
                 int    5.51ms 
               ======= ========

[ 65.38%] ··· Running index_object.Ops.time_subtract                                                                          ok
[ 65.38%] ···· 
               ======= ========
                dtype          
               ------- --------
                float   5.57ms 
                 int    5.50ms 
               ======= ========

[ 69.23%] ··· Running index_object.Range.time_max                                                                         62.2ms
[ 73.08%] ··· Running index_object.Range.time_max_trivial                                                                 62.7ms
[ 76.92%] ··· Running index_object.Range.time_min                                                                         62.9ms
[ 80.77%] ··· Running index_object.Range.time_min_trivial                                                                 62.0ms
[ 84.62%] ··· Running index_object.SetDisjoint.time_datetime_difference_disjoint                                          7.53ms
[ 88.46%] ··· Running index_object.SetOperations.time_operation                                                               ok
[ 88.46%] ···· 
               ============= ============== ======== ======================
               --                                method                    
               ------------- ----------------------------------------------
                   dtype      intersection   union    symmetric_difference 
               ============= ============== ======== ======================
                  datetime       6.16ms      5.93ms          30.9ms        
                date_string      69.5ms      69.3ms          134ms         
                    int          2.69ms      2.88ms          21.9ms        
                  strings        66.7ms      250ms           88.0ms        
               ============= ============== ======== ======================

[ 92.31%] ··· Running index_object.Sortlevel.time_sortlevel_int64                                                          771ms
[ 96.15%] ··· Running index_object.Sortlevel.time_sortlevel_one                                                           18.8ms
[100.00%] ··· Running index_object.Sortlevel.time_sortlevel_zero                                                          18.4ms
```
can you rebase
rebased and all green.
Thanks!