PERF: changed default value of cache parameter to True in to_datetime function
State: closed

- [x] closes #N/A
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Datetime
description: Datetime data dtype
name: Performance
description: Memory or execution speed performance
name: API Design

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

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

```diff
@@            Coverage Diff             @@
##           master   #26043      +/-   ##
==========================================
- Coverage    91.9%   91.89%   -0.01%     
==========================================
  Files         175      175              
  Lines       52485    52485              
==========================================
- Hits        48235    48230       -5     
- Misses       4250     4255       +5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <ø> (ø)` | :arrow_up: |
| #single | `40.78% <ø> (-0.1%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26043?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `84.59% <ø> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `75% <0%> (-12.5%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.79% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.62% <0%> (-0.11%)` | :arrow_down: |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26043?src=pr&el=h1) Report
> Merging [#26043](https://codecov.io/gh/pandas-dev/pandas/pull/26043?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7ab9ff579daebd6b16c357221850f85c7e218d97?src=pr&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `95.45%`.

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

```diff
@@            Coverage Diff             @@
##           master   #26043      +/-   ##
==========================================
+ Coverage   91.79%   91.86%   +0.07%     
==========================================
  Files         180      179       -1     
  Lines       50934    50728     -206     
==========================================
- Hits        46753    46600     -153     
+ Misses       4181     4128      -53
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <95.45%> (-0.03%)` | :arrow_down: |
| #single | `41.1% <50%> (-0.94%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26043?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `85.67% <95.45%> (+0.61%)` | :arrow_up: |
| [pandas/tseries/converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvY29udmVydGVyLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/core/groupby/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9iYXNlLnB5) | `91.83% <0%> (-8.17%)` | :arrow_down: |
| [pandas/plotting/\_misc.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19taXNjLnB5) | `59.49% <0%> (-5.38%)` | :arrow_down: |
| [pandas/plotting/\_matplotlib/converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19tYXRwbG90bGliL2NvbnZlcnRlci5weQ==) | `58.43% <0%> (-5.24%)` | :arrow_down: |
| [pandas/io/excel/\_openpyxl.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsL19vcGVucHl4bC5weQ==) | `84.71% <0%> (-3.23%)` | :arrow_down: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `92.91% <0%> (-3.17%)` | :arrow_down: |
| [pandas/io/formats/printing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvcHJpbnRpbmcucHk=) | `85.56% <0%> (-1.65%)` | :arrow_down: |
| [pandas/core/internals/managers.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL21hbmFnZXJzLnB5) | `95.21% <0%> (-0.94%)` | :arrow_down: |
| [pandas/core/internals/construction.py](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2NvbnN0cnVjdGlvbi5weQ==) | `95.93% <0%> (-0.82%)` | :arrow_down: |
| ... and [80 more](https://codecov.io/gh/pandas-dev/pandas/pull/26043/diff?src=pr&el=tree-more) | |

------

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

@jreback apparently, I didn't understand enough last time about the reasons for the problems in CI builds https://github.com/pandas-dev/pandas/pull/25990#issuecomment-481546715 and the problem was different (maybe in the master, from which I made my branch)

Asv's result will be later.
One downside of changing the default to `True` is that this bug (edge case) will be more evident to users https://github.com/pandas-dev/pandas/issues/22305

Additionally, can you show ASVs/performance benchmarks for converting a _small_ number of arguments? I suspect there will be a performance with a small amount of arguments and `cache=True`. Curious to see if there's an impact in this case (and how significant)
For a vision of the situation as a whole:
`asv continuous -f 1.05 origin/master to_datetime_cache_true -a warmup_time=1 -a sample_time=1`:

master| patch| ratio| test_name
-|-|-|-
1.81±0.01s|           failed|      n/a|  timeseries.ToDatetimeNONISO8601.time_different_offset
489±2μs|      2.33±0.01ms|     4.77|  timeseries.TimeDatetimeConverter.time_convert
4.52±0.02ms|       9.22±0.2ms|     2.04|  reshape.Cut.time_cut_datetime(4)
5.16±0.03ms|      10.0±0.07ms|     1.94|  reshape.Cut.time_cut_datetime(10)
18.9±0.1ms|       31.6±0.4ms|     1.67|  plotting.TimeseriesPlotting.time_plot_regular_compat
19.8±0.1ms|       32.7±0.1ms|     1.65|  plotting.TimeseriesPlotting.time_plot_irregular
2.23±0.02ms|      3.46±0.02ms|     1.55|  timeseries.ToDatetimeISO8601.time_iso8601
2.25±0.02ms|      3.47±0.02ms|     1.54|  timeseries.ToDatetimeISO8601.time_iso8601_format
2.22±0.01ms|      3.42±0.02ms|     1.54|  timeseries.ToDatetimeISO8601.time_iso8601_nosep
2.26±0.01ms|      3.48±0.02ms|     1.54|  timeseries.ToDatetimeISO8601.time_iso8601_format_no_sep
1.58±0.01ms|      2.34±0.01ms|     1.49|  timeseries.ResampleDatetetime64.time_resample
11.3±0.09ms|       16.5±0.6ms|     1.46|  reshape.Cut.time_qcut_datetime(10)
10.6±0.05ms|       15.4±0.2ms|     1.46|  reshape.Cut.time_qcut_datetime(4)
1.47±0.01ms|      1.98±0.01ms|     1.35|  timeseries.ResampleDataFrame.time_method('min')
1.46±0.01ms |        1.96±0ms|     1.34|  timeseries.ResampleDataFrame.time_method('max')
1.44±0.01ms|      1.90±0.02ms|     1.32|  io.csv.ReadCSVParseDates.time_baseline
1.73±0.01ms|      2.24±0.02ms|     1.30|  io.csv.ReadCSVParseDates.time_multiple_date
24.6±0.2ms|       29.9±0.2ms|     1.21|  reshape.Cut.time_cut_datetime(1000)
 947±4μs|         1.10±0ms|     1.16|  timeseries.ResampleDataFrame.time_method('mean')
1.78±0.01ms|      2.03±0.02ms|     1.15|  groupby.Datelike.time_sum('date_range')
3.59±0.02ms|      4.08±0.04ms|     1.14|  timeseries.ToDatetimeYYYYMMDD.time_format_YYYYMMDD
43.3±0.5ms  |     48.5±0.4ms|     1.12|  reshape.Cut.time_qcut_datetime(1000)
1.34±0.02ms  |    1.46±0.01ms   |  1.09 | io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(False, 'ymd')
9.02±0.1ms  |    9.79±0.07ms   |  1.09 | io.sql.ReadSQLTable.time_read_sql_table_parse_dates
1.41±0.03ms  |       1.53±0ms    | 1.08 | io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(False, 'iso8601')
1.73±0.02ms |     1.88±0.01ms  |   1.08|  io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(True, 'ymd')
1.68±0.01ms|      1.82±0.01ms|    1.08|  io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(True, 'iso8601')
2.34±0.02ms|      2.51±0.05ms|     1.08|  rolling.VariableWindowMethods.time_rolling('DataFrame', '1h', 'float', 'kurt')
1.44±0ms |     1.54±0.01ms|     1.07|  algorithms.Hashing.time_series_int
92.4±2ms  |     98.8±0.6ms |    1.07|  binary_ops.Ops.time_frame_multi_and(False, 1)
 456±3μs |         484±4μs|     1.06|  frame_methods.Isnull.time_isnull_floats_no_null
1.44±0.01ms |        1.53±0ms |    1.06|  algorithms.Hashing.time_series_timedeltas
719±7ns|         761±10ns |    1.06 | period.PeriodProperties.time_property('min', 'hour')
5.85±0.2ms  |    6.17±0.07ms |    1.06 | frame_methods.Equals.time_frame_float_unequal
1.45±0ms|      1.52±0.01ms|     1.05|  algorithms.Hashing.time_series_float
3.13±0.04ms    |  3.30±0.02ms |    1.05 | rolling.VariableWindowMethods.time_rolling('Series', '1h', 'float', 'min')
713±4ns |        749±20ns |    1.05 | period.PeriodProperties.time_property('min', 'quarter')
141±0.6ms |         134±2ms |    0.95 | strings.Methods.time_rpartition
105±0.7μs  |     99.8±0.6μs|     0.95  | indexing.NonNumericSeriesIndexing.time_getitem_pos_slice('datetime', 'unique_monotonic_inc')
3.23±0.05μs |     3.04±0.04μs |    0.94 | offset.OnOffset.time_on_offset(<YearBegin: month=1>)
1.74±0.01ms  |    1.64±0.01ms |    0.94 | rolling.Methods.time_rolling('DataFrame', 1000, 'float', 'skew')
3.59±0.02μs|       3.37±0.1μs |    0.94|  timedelta.TimedeltaConstructor.time_from_np_timedelta
231±6ns   |       216±2ns|     0.93|  timestamp.TimestampProperties.time_dayofweek(tzutc(), None)
24.0±2ms |      20.7±0.2ms|     0.86  | indexing.NonNumericSeriesIndexing.time_getitem_list_like('string', 'nonunique_monotonic_inc')
318±5ms|          187±4ms|     0.59|  io.stata.StataMissing.time_read_stata('tw')
283±5ms|          162±3ms|     0.57|  io.stata.StataMissing.time_write_stata('tw')
326±6ms |         184±4ms  |   0.57|  io.stata.StataMissing.time_read_stata('ty')
338±5ms   |       190±6ms |    0.56|  io.stata.StataMissing.time_read_stata('th')
337±5ms   |       187±5ms |    0.55|  io.stata.StataMissing.time_read_stata('tm')
331±8ms  |        181±5ms |    0.55 | io.stata.StataMissing.time_read_stata('tq')
264±10ms  |        129±3ms|     0.49|  io.stata.Stata.time_write_stata('tw')
220±5ms  |       97.0±2ms |    0.44|  io.stata.Stata.time_read_stata('tw')
242±5ms   |      99.4±3ms |    0.41|  io.stata.Stata.time_read_stata('th')
242±1ms   |      98.1±3ms |    0.41|  io.stata.Stata.time_read_stata('tq')
238±4ms    |     96.0±2ms  |   0.40|  io.stata.Stata.time_read_stata('tm')
239±6ms   |      91.4±2ms  |   0.38 | io.stata.Stata.time_read_stata('ty')
336±10ms |      17.0±0.1ms |    0.05|  timeseries.ToDatetimeFormat.time_exact
324±3ms |      16.0±0.3ms  |   0.05|  timeseries.ToDatetimeFormat.time_no_exact
111±4ms  |    3.60±0.03ms  |   0.03|  timeseries.ToDatetimeFormatQuarters.time_infer_quarter
931±4ms  |    2.56±0.01ms   |  0.00  |timeseries.ToDatetimeNONISO8601.time_same_offset

@mroeschke I'll see what can be done with #22305.

It seems that I ran into another kind of error, has it been mentioned before?

Under a small number of arguments you understand 10 - 100?
What other error did you run into? And sure around 50 argument where there are no duplicate arguments to parse.
not that branch, therefore I will do `push --force`. Sorry
@mroeschke I have provided a workaround for #22305 in #26078 PR. Can you see?
First of all, asv test:
```python
class ToDatetimeCacheSmallCount(object):

    params = [True, False]
    param_names = ['cache']

    def setup(self, cache):
        N = 50
        rng = date_range(start='1/1/2000', periods=N)
        self.unique_date_strings = rng.strftime('%Y-%m-%d').tolist()

    def time_unique_date_strings(self, cache):
        to_datetime(self.unique_date_strings, cache=cache)
```
`asv run -E existing -b ^timeseries.ToDatetimeCacheSmallCount -a warmup_time=1 -a sample_time=3`:

cache| test_time
-|-
True|    501±20μs
False|   335±0.9μs

Also I decide perform tests with 5000 elements(to be more confident in numbers)

size|  increase time
-|- 
50| 50%
5000| 48%

I do not know yet what the error is and I want first to do rebase from master
When I run `timeseries.ToDatetimeNONISO8601.time_different_offset`, the following error appears:
`ValueError: Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True`
can you merge master and update
What is the performance impact for the (rather typical I think) case with all unique datetimes? 

@anmyachev can you provide some timings for that? (or point to the benchmark result in one of your previous comments that represent that case)


See also comment of @TomAugspurger on the read_csv PR: https://github.com/pandas-dev/pandas/pull/25990#issuecomment-491143753
> What is the performance impact for the (rather typical I think) case with all unique datetimes?
> 
> @anmyachev can you provide some timings for that? (or point to the benchmark result in one of your previous comments that represent that case)

@jorisvandenbossche result for case with all unique datetimes (decrease in performance about 2 times):

`asv run -E existing -b ToDatetimeCacheSmallCount -a warmup_time=0.5 -a sample_time=1`:

-| count|count|count|count|
-|-|-|-|-
**cache**|      50|       500 |         5000|         100000
True|   574±3μs|   705±10μs|   1.74±0.01ms|    35.0±0.9ms
False|   319±2μs|   391±8μs |     977±0μs|     15.4±0.08ms

Benchmark for asv:

```python
class ToDatetimeCacheSmallCount(object):

    params = ([True, False], [50, 500, 5000, 100000])
    param_names = ['cache', 'count']

    def setup(self, cache, count):
        rng = date_range(start='1/1/1971', periods=count)
        self.unique_date_strings = rng.strftime('%Y-%m-%d').tolist()

    def time_unique_date_strings(self, cache, count):
        to_datetime(self.unique_date_strings, cache=cache)
```
is this orthogonal to #26097 
> is this orthogonal to #26097

Not sure... that PR is trying to address a bug that manifests when `cache=True`, so if default is changed then exposure for that bug would be higher. But still these could potentially be applied independently.
small comment, pls merge master and ping on green.
@anmyachev thanks for pointing to the benchmark results. 
So basically, this PR gives a 2x slowdown for the (I think typical) case of all uniques dates, that's correct? 
Do we think this is worth it?

@jreback before merging, can you respond to those performance questions (see also question raised by @TomAugspurger at https://github.com/pandas-dev/pandas/pull/25990#issuecomment-491143753)


> So basically, this PR gives a 2x slowdown for the (I think typical) case of all uniques dates, that's correct?

About that. It's possible to add a quick heuristic check (like "if there's lots of dates let's see if first 1000 are unique and cache only if they aren't"), though.

As for whether this is typical - that really depends on what data we're talking. In the benchmarks we were working with most dates were duplicates (and I think that there would typically be lots of duplicates if we're using dates, not datetimes, as there are only so many days in a year).
can you merge master

> About that. It's possible to add a quick heuristic check (like "if there's lots of dates let's see if first 1000 are unique and cache only if they aren't"), though.

this is actually ok to do (and a quick cheap check), should be easy to implement; we do this elsewhere (check the first few elements)
can you merge master and see if you can do what I suggest above about using a heurestic to avoid small unique array slowdowns.
> can you merge master and see if you can do what I suggest above about using a heurestic to avoid small unique array slowdowns.

@jreback Yes, I will do this. Sorry for delay.
> can you show the new perf numbers

Yes. Results will come later; benchmarks in progress.
@jreback new results (the slowdown of no more than 42 percent):

master| patch| ratio| test_name
-|-|-|-
1.71±0s       |    failed  |    n/a|  timeseries.ToDatetimeNONISO8601.time_different_offset
1.46±0.01ms|      2.07±0.01ms|     1.42|  timeseries.ResampleDataFrame.time_method('min')
1.47±0.01ms|      2.05±0.04ms   |  1.39|  timeseries.ResampleDataFrame.time_method('max')
1.78±0.01ms |     2.29±0.01ms  |   1.28|  timeseries.ResampleDatetetime64.time_resample
932±2μs        | 1.14±0ms |    1.22  |timeseries.ResampleDataFrame.time_method('mean')
337±1μs         |407±20μs  |   1.21  |timeseries.ResetIndex.time_reest_datetimeindex(None)
2.14±0.03ms   |      2.56±0ms  |   1.19|  timeseries.ToDatetimeISO8601.time_iso8601_format_no_sep
2.20±0ms         |2.58±0ms     |1.17  |timeseries.ToDatetimeISO8601.time_iso8601
2.04±0.01ms     | 2.40±0.01ms|     1.17 | timeseries.ResampleSeries.time_resample('datetime', '5min', 'mean')
2.16±0ms  |       2.54±0ms    | 1.17|  timeseries.ToDatetimeISO8601.time_iso8601_nosep
2.20±0ms   |      2.58±0ms     |1.17 | timeseries.ToDatetimeISO8601.time_iso8601_format
2.73±0.03ms|      3.06±0.01ms|     1.12 | timeseries.ResampleSeries.time_resample('datetime', '5min', 'ohlc')
1.64±0ms      |   1.83±0ms     |1.12|  timeseries.ResampleSeries.time_resample('datetime', '1D', 'mean')
1.73±0ms      |1.93±0.01ms    | 1.11|  timeseries.ResampleSeries.time_resample('datetime', '1D', 'ohlc')
1.76±0ms    |  1.94±0.03ms     |1.11 | groupby.Datelike.time_sum('date_range')
3.53±0.02ms|      3.81±0.03ms |    1.08 | timeseries.ToDatetimeYYYYMMDD.time_format_YYYYMMDD
3.53±0.02ms |     3.81±0.03ms  |   1.08  |timeseries.ToDatetimeYYYYMMDD.time_format_YYYYMMDD
4.66±0.03ms  |    5.03±0.01ms   |  1.08 | reshape.Cut.time_cut_datetime(10)
3.59±0.01ms   |    3.85±0.2ms     |1.07 | timeseries.TimeDatetimeConverter.time_convert
2.10±0.01ms    |     2.25±0ms   |  1.07| timeseries.ToDatetimeCache.time_dup_string_dates_and_format(True)
2.10±0.01ms |     2.25±0.01ms |    1.07 | timeseries.ToDatetimeCache.time_dup_string_dates(True)
454±3μs        |  486±6μs   |  1.07 | frame_methods.Isnull.time_isnull
532±4μs       | 568±0.4μs   |  1.07 | stat_ops.FrameOps.time_op('mean', 'int', 1, False)
1.99±0.02μs  |    2.12±0.06μs|     1.07 | indexing_engines.NumericEngineIndexing.time_get_loc((<class 'pandas._libs.index.Float64Engine'>, <class 'numpy.float64'>), 'monotonic_incr')
2.53±0.01ms  |    2.69±0.01ms|     1.06|  timeseries.ToDatetimeCache.time_dup_string_tzoffset_dates(True)
184±0.6ns       |   196±3ns     |1.06 | multiindex_object.Integer.time_is_monotonic
3.97±0.03ms    |  4.22±0.05ms|     1.06|  reshape.Cut.time_cut_datetime(4)
238±0.5μs        |252±0.8μs     |1.06|  reindex.Fillna.time_reindexed('backfill')
16.0±0.2ms       |16.9±0.2ms   |  1.06|  indexing.NonNumericSeriesIndexing.time_getitem_label_slice('string', 'nonunique_monotonic_inc')
327±4ms     |    344±10ms   |  1.05 | timeseries.Iteration.time_iter(<function date_range at 0x7f6ccfa126a8>)
337±4ns       |  355±10ns    | 1.05  |dtypes.DtypesInvalid.time_pandas_dtype_invalid('array-string')
2.91±0.01ms |     3.06±0.02ms |    1.05 | timeseries.ToDatetimeCache.time_dup_seconds_and_unit(True)
2.27±0.02ms  |    2.39±0.01ms  |   1.05  |io.csv.ReadCSVParseDates.time_multiple_date
175±2ms        |  183±1ms  |   1.05 | stat_ops.SeriesMultiIndexOps.time_op([0, 1], 'kurt')
227±1ns          |216±2ns     |0.95  |timestamp.TimestampProperties.time_is_year_end(<DstTzInfo 'Europe/Amsterdam' LMT+0:20:00 STD>, None)
3.54±0.04ms    |     3.36±0ms|     0.95 | timeseries.ToDatetimeCache.time_unique_seconds_and_unit(False)
4.34±0.01ms     | 4.09±0.04ms|     0.94|  io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(True, 'custom')
1.80±0.01ms      |1.69±0.01ms |    0.94 | io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(True, 'iso8601')
2.17±0.01ms   |   2.04±0.04ms  |   0.94  |rolling.ExpandingMethods.time_expanding('Series', 'int', 'kurt')
1.85±0.01ms    |     1.73±0ms     |0.94  |io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(True, 'ymd')
2.26±0.04ms     | 2.12±0.05ms    | 0.93 | rolling.Methods.time_rolling('Series', 1000, 'int', 'kurt')
235±3ns      |    220±2ns     |0.93 | timestamp.TimestampProperties.time_is_quarter_end(tzutc(), None)
237±3ns     |     221±5ns     |0.93  |timestamp.TimestampProperties.time_days_in_month(<DstTzInfo 'Europe/Amsterdam' LMT+0:20:00 STD>, None)
49.1±3ms     |  45.3±0.3ms |    0.92|  binary_ops.Ops.time_frame_comparison(False, 1)
1.52±0ms      |1.39±0.01ms |    0.91|  io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(False, 'iso8601')
49.7±0.4ms    |   45.2±0.1ms|     0.91|  binary_ops.Ops.time_frame_comparison(False, 'default')
1.45±0ms        | 1.32±0ms    | 0.91|  io.csv.ReadCSVDInferDatetimeFormat.time_read_csv(False, 'ymd')
241±1μs     |   215±0.1μs     |0.89 | indexing_engines.NumericEngineIndexing.time_get_loc((<class 'pandas._libs.index.UInt8Engine'>, <class 'numpy.uint8'>), 'monotonic_incr')
24.4±0.1ms |     20.2±0.05ms|     0.83 | io.csv.ReadCSVConcatDatetime.time_read_csv
388±3μs       | 312±0.8μs     |0.80 | timeseries.ToDatetimeCacheSmallCount.time_unique_date_strings(True, 50)
4.74±0.04ms |        3.53±0ms|     0.75|  timeseries.ToDatetimeCache.time_unique_seconds_and_unit(True)
507±4μs        |366±0.9μs     |0.72 | timeseries.ToDatetimeCacheSmallCount.time_unique_date_strings(True, 500)
290±5ms |         171±1ms     |0.59|  io.stata.StataMissing.time_write_stata('tw')
295±3ms  |        169±3ms     |0.57 | io.stata.StataMissing.time_read_stata('tw')
1.51±0ms  |        846±4μs    | 0.56  | timeseries.ToDatetimeCacheSmallCount.time_unique_date_strings(True, 5000)
268±4ms  |       148±10ms    | 0.55|  io.stata.Stata.time_write_stata('tw')
825±100μs|        456±0.7μs   |  0.55|  series_methods.Clip.time_clip(50)
842±100μs |         461±8μs     |0.55  |series_methods.Clip.time_clip(1000)
311±5ms     |     168±2ms |    0.54|  io.stata.StataMissing.time_read_stata('tq')
 317±5ms     |     171±2ms |    0.54|  io.stata.StataMissing.time_read_stata('tm')
311±7ms       |   163±3ms   |  0.52  |io.stata.StataMissing.time_read_stata('ty')
318±1ms        |  166±6ms    | 0.52 | io.stata.StataMissing.time_read_stata('th')
24.3±0.06ms   |   10.4±0.02ms|     0.43|  timeseries.ToDatetimeCacheSmallCount.time_unique_date_strings(True, 100000)
217±8ms         |87.9±2ms |    0.41|  io.stata.Stata.time_read_stata('tw')
237±3ms         |91.9±1ms  |   0.39 | io.stata.Stata.time_read_stata('tq')
233±6ms         |89.7±2ms   |  0.39  |io.stata.Stata.time_read_stata('tm')
239±4ms         |90.4±2ms    | 0.38 | io.stata.Stata.time_read_stata('th')
234±6ms         |85.9±4ms     |0.37  |io.stata.Stata.time_read_stata('ty')
65.9±0.8ms      |3.52±0.01ms |    0.05|  timeseries.ToDatetimeFormatQuarters.time_infer_quarter
314±2ms      |14.5±0.02ms     |0.05 | timeseries.ToDatetimeFormat.time_no_exact
325±7ms      |14.9±0.02ms     |0.05  |timeseries.ToDatetimeFormat.time_exact
868±2ms      |2.84±0.05ms  |   0.00 | timeseries.ToDatetimeNONISO8601.time_same_offset
@anmyachev can you merge master
and I think some checks are failing
@anmyachev can you merge master
@anmyachev can you update this? I think some checks are failing
lgtm. ping on green.