You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing conversions to and from Zoned values, one thing that shows up on the profile are TZif lookups. Every lookup needs to do a binary search of some kind.
My guess is that the binary search can probably be skipped in most cases at the expense of checking transitions near either the current time or the most recently requested lookup. The current time could be used at construction and so sidesteps problems of synchronization during caching, but could become stale in a longer running process. But perhaps that staleness is fine.
Note that I believe we can afford to spend a fair amount of effort (and perhaps even memory) at TZif construction time, since TZif construction generally happens ~once for each time zone. (That part is already cached.)
The text was updated successfully, but these errors were encountered:
When doing conversions to and from
Zoned
values, one thing that shows up on the profile are TZif lookups. Every lookup needs to do a binary search of some kind.My guess is that the binary search can probably be skipped in most cases at the expense of checking transitions near either the current time or the most recently requested lookup. The current time could be used at construction and so sidesteps problems of synchronization during caching, but could become stale in a longer running process. But perhaps that staleness is fine.
Note that I believe we can afford to spend a fair amount of effort (and perhaps even memory) at TZif construction time, since TZif construction generally happens ~once for each time zone. (That part is already cached.)
The text was updated successfully, but these errors were encountered: