3 ms·
I wrote a program in C++ to download massive amounts of stock data from a data provider. The binary itself is 2 MB, memory use rises to over 16 GB and it frees
by purpleblue 3y ago
I wrote a program in C++ to download massive amounts of stock data from a data provider. The binary itself is 2 MB, memory use rises to over 16 GB and it frees everything at the end, so there are no memory leaks (I'm particularly proud of that). Over the years I've found better and better ways of making it run faster because a daily run will take over 6 hours of downloading and writing to my database.
I also wrote a multi-threaded backtester in C++ because the program I was using was only single-threaded. I stopped using that several years ago but the act of writing it was a lot of fun.
- l2silver 3y agoI should really give c++ a go...
- bschwindHN 3y agoIf you're going for multi-threaded and "frees all memory at the end", it's probably going to be way easier to write it in Rust, and you should end up with essentially the same result.
- gaws 3y agoIs the code public?