Skip to content

New Windows CFTimeZone identifier lookups could be more efficient #5073

Open
@jmschonfeld

Description

@jmschonfeld

In #5070 I restored the Windows behavior for converting between Windows and Olson timezone identifiers. This conversion currently performs a linear search through a list of identifiers to find a matching pair and return the result. We could be more efficient here by pre-sorting the list and performing a binary search or sorting based on a pre-computed hash to mimic a constant-dictionary for constant time lookup.

https://github.com/apple/swift-corelibs-foundation/blob/e0f1615328571f9a27d4bb55efb0e1e57e2ea941/Sources/CoreFoundation/CFTimeZone_WindowsMapping.c#L529-L542

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions