New benchmarks for parsing dates with dayfirst=True and format='%d-%m-%Y'
State: closed

- [x] closes #25848
- [x] tests added
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Gap in performance between use dayfirst or format is acceptable now.

`asv run -E existing -b ParseDateComparison -a warmup_time=2 -a sample_time=2`:

| io.csv.ParseDateComparison.time_read_csv_dayfirst | parameter| time
:-:|:-:|:-:
-|cache_dates| -
-|False|      16.3±0.4ms
-|True|      7.22±0.2ms
| **io.csv.ParseDateComparison.time_to_datetime_dayfirst** | **parameter**| **time**
-|cache_dates| -
-|False|      15.0±0.3ms
-|True|      5.67±0.2ms
| **io.csv.ParseDateComparison.time_to_datetime_format_DD_MM_YYYY** | **parameter**| **time**
-| cache_dates|-
-|False|      25.0±0.4ms
-|True|      5.47±0.4ms

Labels:
name: Datetime
description: Datetime data dtype
name: Performance
description: Memory or execution speed performance
name: IO CSV
description: read_csv, to_csv

Comments:
great, can you show results for thee in the top-section.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26360?src=pr&el=h1) Report
> Merging [#26360](https://codecov.io/gh/pandas-dev/pandas/pull/26360?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/4a30fa52f9b31abf9bb6e59a2baf2686e8af5640?src=pr&el=desc) will **decrease** coverage by `0.13%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #26360      +/-   ##
==========================================
- Coverage   91.81%   91.68%   -0.14%     
==========================================
  Files         175      174       -1     
  Lines       52289    50700    -1589     
==========================================
- Hits        48009    46482    -1527     
+ Misses       4280     4218      -62
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.18% <ø> (-0.18%)` | :arrow_down: |
| #single | `41.19% <ø> (+0.32%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26360?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.01% <0%> (-0.12%)` | :arrow_down: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26360?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/26360?src=pr&el=footer). Last update [4a30fa5...3b1034b](https://codecov.io/gh/pandas-dev/pandas/pull/26360?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/26360?src=pr&el=h1) Report
> Merging [#26360](https://codecov.io/gh/pandas-dev/pandas/pull/26360?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/4a30fa52f9b31abf9bb6e59a2baf2686e8af5640?src=pr&el=desc) will **decrease** coverage by `0.12%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #26360      +/-   ##
==========================================
- Coverage   91.81%   91.68%   -0.13%     
==========================================
  Files         175      174       -1     
  Lines       52289    50749    -1540     
==========================================
- Hits        48009    46530    -1479     
+ Misses       4280     4219      -61
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.19% <ø> (-0.17%)` | :arrow_down: |
| #single | `41.16% <ø> (+0.29%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26360?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/compat/numpy/function.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9udW1weS9mdW5jdGlvbi5weQ==) | `90.39% <0%> (-0.41%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.02% <0%> (-0.12%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.67% <0%> (ø)` | :arrow_up: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | | |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.72% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/integer.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2ludGVnZXIucHk=) | `96.35% <0%> (+0.02%)` | :arrow_up: |
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `95.63% <0%> (+0.14%)` | :arrow_up: |
| [pandas/core/arrays/sparse.py](https://codecov.io/gh/pandas-dev/pandas/pull/26360/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3NwYXJzZS5weQ==) | `92.7% <0%> (+0.39%)` | :arrow_up: |

------

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

@anmyachev 

> @jreback Should I make the conditions for testing the same? (for this, most likely I will have to create new classes)

yes making these consistent for benchmarks (and testing both cache on/off would be great)
> yes making these consistent for benchmarks (and testing both cache on/off would be great)

@jreback this is done.

thanks @anmyachev