I come across this a lot. I optimize the importing of a file, but I'm stuck parsing timestamps. I have to map DateObject
across these timestamps. Mapping is slower than WL functions optimized with a Listable
attribute. Is there a better way to handle timestamps?
I thought I could speed it up by specifying $DefaultStringFormat
in Block
, but that didn't help. Any other ideas?
Block[{$DateStringFormat = {"Month", "/", "Day", "/", "Year", " ", "Hour12", ":", "Minute", ":", "Second", " ", "AMPM"}},
DateObject /@ listOfTimestamps
];
This is taking 10s when the import takes 0.1s.