Open oxinabox opened 3 years ago
This is yet another PR relating to #271 It doesn't solve it totally, It needs #327 to handling FixedTimeZones, and #332 to make the ZonedDateTime parametric. But with those 3 it would solve everything.
It is most similar to https://github.com/JuliaTime/TimeZones.jl/pull/287 / https://github.com/JuliaTime/TimeZones.jl/pull/323 but with rather than a dynamically created lookup table as timezones are used, it has a static (but lazy) look up table. This table always maps the same integer id, to the same timezone. This means we don't need to worry about serialization.
Here is the C code for the perfect hashing that gperf generated.
gperf
Right now this code is kinda gross. Especially around loading it. We have 2 caches, and idk we probably only need 1.
This is yet another PR relating to #271 It doesn't solve it totally, It needs #327 to handling FixedTimeZones, and #332 to make the ZonedDateTime parametric. But with those 3 it would solve everything.
It is most similar to https://github.com/JuliaTime/TimeZones.jl/pull/287 / https://github.com/JuliaTime/TimeZones.jl/pull/323 but with rather than a dynamically created lookup table as timezones are used, it has a static (but lazy) look up table. This table always maps the same integer id, to the same timezone. This means we don't need to worry about serialization.
Here is the C code for the perfect hashing that
gperf
generated.Right now this code is kinda gross. Especially around loading it. We have 2 caches, and idk we probably only need 1.