JuliaTime / TimeZones.jl

IANA time zone database access for the Julia programming language
Other
86 stars 51 forks source link

Creating `TimeZone` from string allocates unnecessarily #422

Closed nickrobinson251 closed 1 month ago

nickrobinson251 commented 1 year ago
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)