Skip to content

PERF: Period constructor parses input twice #38312

Closed
@arw2019

Description

@arw2019

#38175 added correct handling of nanoseconds in the Period constructor but the code path as is parses the input twice. We should integrate the nanoseconds code into parse_time_string so this happens only once.

xref https://github.com/pandas-dev/pandas/pull/38175/files#r536100941

It might be worth adding a nanosecond Period constructor benchmark too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PerformanceMemory or execution speed performancePeriodPeriod data type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions