Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- const unsigned long long size = 8ULL*1024ULL*1024ULL; unsigned long long a[size];
- int main()
- {
- FILE* pFile;
- pFile = fopen("file.binary", "wb");
- for (unsigned long long j = 0; j < 1024; ++j){
- //Some calculations to fill a[]
- fwrite(a, 1, size*sizeof(unsigned long long), pFile); }
- fclose(pFile);
- return 0; }
- /**
- * PanicSheep 841
- * 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
- * beginning of my post used one core 100%, whereas this code only uses 2-5%.
- * Thanks a lot to everyone.
- **/
Add Comment
Please, Sign In to add comment