Advertisement
Guest User

fread vs read resource usage

a guest
Oct 26th, 2016
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. // All values are listed in seconds. 100MB is equal to 100000000 bytes or one hundred million bytes.
  2. // Test was run on a virtual machine running Ubuntu 14.04 of unknown specifications.
  3.  
  4.  
  5. // fread()
  6.  
  7. // 100MB * 1
  8. 0.016000
  9. 0.016000
  10. 0.016000
  11. 0.012000
  12. 0.012000
  13.  
  14. // 1 * 100MB
  15. 0.008000
  16. 0.008000
  17. 0.004000
  18. 0.004000
  19. 0.004000
  20.  
  21.  
  22. // read()
  23.  
  24. // 100MB * 1
  25. 0.016000
  26. 0.016000
  27. 0.012000
  28. 0.012000
  29. 0.012000
  30.  
  31. // 1 * 100MB
  32. 48.772000
  33. 39.636000
  34. 51.312000
  35. 51.492000
  36. 63.844000
  37.  
  38.  
  39. // Average or mean
  40.  
  41. // fread()
  42. 0.0144 // 100MB * 1
  43. 0.0056 // 1 * 100MB
  44.  
  45. read()
  46. 51.31 // 1 * 100MB
  47. 0.0136 // 100MB * 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement