lundi 7 décembre 2020

Create huge text file - multi-threading a good idea?

A need to create huge (>10 Gb) text files where every line is a very long number, basically a string as even types like unsigned long long won't be enough. So i will be using random generator and first though was that probably it's a good idea create several threads. From what I see, every thread will be writing one line at a time, which is considered a thread safe operation in C++. Is it a good idea or am I missing something and it's better just to write line by line from one thread?

Aucun commentaire:

Enregistrer un commentaire