Guest User

Untitled

a guest
Dec 10th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2. const unsigned long long size = 8ULL*1024ULL*1024ULL; unsigned long long a[size];
  3. int main()
  4. {
  5. FILE* pFile;
  6. pFile = fopen("file.binary", "wb");
  7. for (unsigned long long j = 0; j < 1024; ++j){
  8. //Some calculations to fill a[]
  9. fwrite(a, 1, size*sizeof(unsigned long long), pFile); }
  10. fclose(pFile);
  11. return 0; }
  12. /**
  13. * PanicSheep 841
  14. * I just timed 8GB in 36sec, which is about 220MB/s and I think that maxes out my SSD. Also worth to note, the code at the
  15. * beginning of my post used one core 100%, whereas this code only uses 2-5%.
  16. * Thanks a lot to everyone.
  17. **/
Add Comment
Please, Sign In to add comment