Skip to content

ASV: Add benchmark when comparing datetimes with different reso #52203

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

Merged
merged 2 commits into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions asv_bench/benchmarks/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,14 @@ def setup(self, tz):
self.ts = self.s[halfway]

self.s2 = Series(date_range("20010101", periods=N, freq="s", tz=tz))
self.ts_different_reso = Timestamp("2001-01-02", tz=tz)

def time_series_timestamp_compare(self, tz):
self.s <= self.ts

def time_series_timestamp_different_reso_compare(self, tz):
self.s <= self.ts_different_reso

def time_timestamp_series_compare(self, tz):
self.ts >= self.s

Expand Down