Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: ASV timedelta #19150

Merged
merged 1 commit into from
Jan 9, 2018
Merged

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Jan 9, 2018

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 
               ======== =======

@jreback jreback added Timedelta Timedelta data type Benchmark Performance (ASV) benchmarks labels Jan 9, 2018
@jreback jreback added this to the 0.23.0 milestone Jan 9, 2018
@jreback jreback merged commit 45a7012 into pandas-dev:master Jan 9, 2018
@jreback
Copy link
Contributor

jreback commented Jan 9, 2018

thanks!

@mroeschke mroeschke deleted the asv_clean_timedelta branch January 9, 2018 17:45
maximveksler pushed a commit to maximveksler/pandas that referenced this pull request Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants