Fastest way to write huge data in file

后端 未结 3 1907
感动是毒
感动是毒 2020-12-05 15:07

I am trying to create a random real, integers, alphanumeric, alpha strings and then writing to a file till the file size reaches 10MB.

The code is a

3条回答
  •  Happy的楠姐
    2020-12-05 15:57

    You literally create billions of objects which you then quickly throw away. In this case, it's probably better to write the strings directly into the file instead of concatenating them with ''.join().

提交回复
热议问题