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
Unpacking Python native type Datetime is slow, I currently am working on a PR to hopefully improve the performance of unpacking regular Datetime objects. In the process of reviewing this PR @dimitri-yatsenko has shown that the unpacking of np.datetime64 is much faster than native Datetime. We should look into adding support for np.datetime objects.
Requirements
Update Datajoint.Blob Unpack/Pack methods to support np.datetime64
Justification
Adding support for this type would greatly improve performance of retrieving datetime objects
The problem is that datatime.datetime objects are stored inside numpy.array as type object and must be serialized by explicit python code. The type numpy.datetime64 can be serialized by numpy's compiled code, a x500 speedup.
If we add support for numpy.datetime64, the change will not be backward compatible. We will continue to support datetime.datetime and numpy.datetime64 with very different deserialization speeds.
Feature Request
Problem
Unpacking Python native type
Datetime
is slow, I currently am working on a PR to hopefully improve the performance of unpacking regularDatetime
objects. In the process of reviewing this PR @dimitri-yatsenko has shown that the unpacking ofnp.datetime64
is much faster than nativeDatetime
. We should look into adding support fornp.datetime
objects.Requirements
Update Datajoint.Blob Unpack/Pack methods to support
np.datetime64
Justification
Adding support for this type would greatly improve performance of retrieving datetime objects
Alternative Considerations
Current workaround is found here
The text was updated successfully, but these errors were encountered: