Skip to content

Creating TimeZone from string allocates unnecessarily #422

@nickrobinson251

Description

@nickrobinson251
julia> using TimeZones

julia> TimeZone("UTC");  # populate cache

julia> @allocations TimeZone("UTC")  
2

UTC is a FixedTimeZone, which is already in the cache, and a FixedTimeZone is isbits... but we still allocate twice (when we should not need to allocate at all)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions