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
I think many of the access functions (e.g. year(), yday()) could be reimplemented much more efficiently by taking advantage of the fact that it's easy to determine year offsets with a lookup table (e.g. https://github.com/hadley/readr/blob/master/src/DateTime.h). My intuition is that plus some modular arithmetic should be orders of magnitude faster than using as.POSIXlt
The text was updated successfully, but these errors were encountered:
My intuition is that plus some modular arithmetic should be orders of magnitude faster than using as.POSIXlt
It will probably work for all units in UTC. I guess it could straightforwardly work for year, month and day irrespectively of the timezone. For smaller units it's tricky.
Our real problem is with the other way around -as.POSIXct - which is crucial for all updates. It's 5x slower than as.POIXlt.
I think many of the access functions (e.g.
year()
,yday()
) could be reimplemented much more efficiently by taking advantage of the fact that it's easy to determine year offsets with a lookup table (e.g. https://github.com/hadley/readr/blob/master/src/DateTime.h). My intuition is that plus some modular arithmetic should be orders of magnitude faster than usingas.POSIXlt
The text was updated successfully, but these errors were encountered: