CLN: ASV timedelta
State: closed

Cleaned up some setups and used `setup_cache` where applicable. Although the `time_from_iso_format` benchmark failed here, it looks like it passed in #19065. 

```
[  0.00%] ··· Setting up /home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/timedelta.py:111
[  4.55%] ··· Running timedelta.DatetimeAccessor.time_dt_accessor        99.1μs
[  9.09%] ··· Running timedelta.DatetimeAccessor.time_timedelta_days      2.17s
[ 13.64%] ··· Running ...atetimeAccessor.time_timedelta_microseconds      2.15s
[ 18.18%] ··· Running ...DatetimeAccessor.time_timedelta_nanoseconds      2.14s
[ 22.73%] ··· Running ...lta.DatetimeAccessor.time_timedelta_seconds      2.16s
[ 22.73%] ··· Setting up /home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/timedelta.py:90
[ 27.27%] ··· Running ...lta.TimedeltaProperties.time_timedelta_days     10.2μs
[ 31.82%] ··· Running ...deltaProperties.time_timedelta_microseconds     10.2μs
[ 36.36%] ··· Running ...edeltaProperties.time_timedelta_nanoseconds     9.99μs
[ 40.91%] ··· Running ....TimedeltaProperties.time_timedelta_seconds     11.3μs
[ 45.45%] ··· Running ...a.TimedeltaConstructor.time_from_components     63.7μs
[ 50.00%] ··· Running ...ltaConstructor.time_from_datetime_timedelta     34.9μs
[ 54.55%] ··· Running timedelta.TimedeltaConstructor.time_from_int       32.7μs
[ 59.09%] ··· Running ...a.TimedeltaConstructor.time_from_iso_format     failed
[ 59.09%] ····· Traceback (most recent call last):
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/site-packages/asv/benchmark.py", line 818, in <module>
                    commands[mode](args)
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/site-packages/asv/benchmark.py", line 795, in main_run
                    result = benchmark.do_run()
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/site-packages/asv/benchmark.py", line 349, in do_run
                    return self.run(*self._current_params)
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/site-packages/asv/benchmark.py", line 424, in run
                    samples, number = self.benchmark_timing(timer, repeat, warmup_time, number=number)
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/site-packages/asv/benchmark.py", line 471, in benchmark_timing
                    timing = timer.timeit(number)
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/timeit.py", line 202, in timeit
                    timing = self.inner(it, self.timer)
                  File "/home/matt/anaconda/envs/pandas_dev/lib/python2.7/timeit.py", line 100, in inner
                    _func()
                  File "/home/matt/Projects/pandas-mroeschke/asv_bench/benchmarks/timedelta.py", line 31, in time_from_iso_format
                    Timedelta('P4DT12H30M5S')
                  File "pandas/_libs/tslib.pyx", line 2588, in pandas._libs.tslib.Timedelta.__new__
                  File "pandas/_libs/tslibs/timedeltas.pyx", line 159, in pandas._libs.tslibs.timedeltas.parse_timedelta_string
                  File "pandas/_libs/tslibs/timedeltas.pyx", line 296, in pandas._libs.tslibs.timedeltas.timedelta_from_spec
                ValueError: invalid abbreviation: P

[ 63.64%] ··· Running ...elta.TimedeltaConstructor.time_from_missing     19.2μs
[ 68.18%] ··· Running ...TimedeltaConstructor.time_from_np_timedelta     31.3μs
[ 72.73%] ··· Running ...delta.TimedeltaConstructor.time_from_string     42.1μs
[ 77.27%] ··· Running timedelta.TimedeltaConstructor.time_from_unit      40.0μs
[ 81.82%] ··· Running timedelta.TimedeltaOps.time_add_td_ts              26.3ms
[ 86.36%] ··· Running timedelta.ToTimedelta.time_convert_int              545μs
[ 90.91%] ··· Running timedelta.ToTimedelta.time_convert_string_days      152ms
[ 95.45%] ··· Running ...lta.ToTimedelta.time_convert_string_seconds      146ms
[100.00%] ··· Running timedelta.ToTimedeltaErrors.time_convert               ok
[100.00%] ···· 
               ======== =======
                errors         
               -------- -------
                coerce   401ms 
                ignore   394ms 
               ======== =======
```

  

Labels:
name: Timedelta
description: Timedelta data type
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
thanks!