Hi folks
Newbie question here. I've figured out everything I need for my project except
for one showstopping issue, and would very much appreciate a hand.
I need a fast way to serialize and deserialize a seq of a relatively simple
object to a binary file. The typical sequence will contain a few million
objects, hence the need for speed.
There are a couple of Nimble packages out there, but their docs don't cover
this use-case in a way I can understand and I've failed to get anything working.
The object is a price/volume bar for trading. Ideally it would be:
type Bar = object
d: DateTime
o: float
h: float
l: float
c: float
v: float
Run
If the DateTime field was an obstacle I could live with an int64 for a
timestamp, but converting back to a timestamp is quite slow, so this would be
suboptimal.
I may need to include an enum as well, though I could simply use an int key if
that was a problem.
I've spent more time on this than is entirely sensible, so a working code
example would be a godsend!