Skip to content

PERF/DISC: restrict inputs to is_foo_dtype #33368

Closed
@jbrockmendel

Description

@jbrockmendel

xref #33364

A lot of the overhead in is_foo_dtype (which we call a lot) comes from checking for dtype objects, arrays, and strings. We could tighten these to be e.g.

def is_extension_arrray_dtype(obj):
     return isinstance(obj, ExtensionDtype)

The trouble with this is some of these are user-facing, so this would require a deprecation cycle, and in the interim the warnings call would actually hurt performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionRequires discussion from core team before further actionPerformanceMemory or execution speed performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions