Advertisement
sewer56lol

dlang-prs benchmarks

Jul 16th, 2018
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.19 KB | None | 0 0
  1. Benchmarks:
  2.  
  3. CPU: i7 4790k @ 4.5GHz
  4. RAM: 24GB CL9 1866MHz
  5.  
  6. Each benchmark is an average of 5 runs.
  7. Benchmark consists of compressing/decompressing a file and writing
  8. it onto a solid state drive.
  9.  
  10. As the window size for FraGag.Compression.Prs is not modifiable, only
  11. the default has been included. For FraGag.Compression.Prs, the fastest code path/overload
  12. has been used for compression/decompression, being the array and MemoryStream path respectively.
  13.  
  14. Decompression benchmarks are performed on files output by FraGag.Compression.Prs.
  15. All percentages are rounded down (I'm lazy).
  16.  
  17. dlang-prs has been compiled under LDC2 (LDC 1.11.0-beta1)
  18.  
  19. --------------------------------
  20. tl;dr Head to head.
  21. Aggregated from arbitrary tests below.
  22. In relative decompression speed, the smaller size tests are ignored because I did not measure
  23. time accurately enough (4ms and 5ms aren't relatively speaking accurate enough for proper comparison).
  24.  
  25. X64 Compression:
  26.  
  27. --------------------------------------------------------------------------------------------
  28. Name | Relative Speed % | Relative Size % | Average Compression Ratio %
  29. --------------------------------------------------------------------------------------------
  30. FraGag.Compression.Prs | 100 | 100 | 37.4
  31. dlang-prs (Wrapper) | 151.8 | 101.7 | 38.2
  32. dlang-prs (0x7FF Buffer) | 452.7 | 112.0 | 42.5
  33. --------------------------------------------------------------------------------------------
  34.  
  35. X86 Compression:
  36.  
  37. --------------------------------------------------------------------------------------------
  38. Name | Relative Speed % | Relative Size % | Average Compression Ratio %
  39. --------------------------------------------------------------------------------------------
  40. FraGag.Compression.Prs | 100 | 100 | 37.4
  41. dlang-prs (Wrapper) | 268.7 | 101.7 | 38.2
  42. dlang-prs (0x7FF Buffer) | 806.6 | 112.0 | 42.5
  43. --------------------------------------------------------------------------------------------
  44.  
  45. X64 Decompression:
  46.  
  47. ----------------------------------------------
  48. Name | Relative Speed % |
  49. ----------------------------------------------
  50. FraGag.Compression.Prs | 100 |
  51. dlang-prs (Wrapper) | 143.8 |
  52. ----------------------------------------------
  53.  
  54. X86 Decompression:
  55.  
  56. ----------------------------------------------
  57. Name | Relative Speed % |
  58. ----------------------------------------------
  59. FraGag.Compression.Prs | 100 |
  60. dlang-prs (Wrapper) | 167.5 |
  61. ----------------------------------------------
  62.  
  63. I can't get fuzziqer's original implementation compiled so I couldn't add it here.
  64.  
  65. --------------------------------
  66. Large, Windows Executable
  67. TSonic_win.exe (5,132,288 bytes)
  68.  
  69. Compress X64:
  70. ---------------------------------------------------------------------------------------------------------
  71. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  72. ---------------------------------------------------------------------------------------------------------
  73. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 9551ms | 2,931,322 bytes | 57.1%
  74. dlang-prs ||(0x1FFF window) || ||: 9573ms | 2,931,322 bytes | 57.1%
  75. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 14384ms | 2,838,425 bytes | 55.3%
  76. ---------------------------------------------------------------------------------------------------------
  77.  
  78. Compress X86:
  79.  
  80. ---------------------------------------------------------------------------------------------------------
  81. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  82. ---------------------------------------------------------------------------------------------------------
  83. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 9498ms | 2,931,322 bytes | 57.1%
  84. dlang-prs ||(0x1FFF window) || ||: 9510ms | 2,931,322 bytes | 57.1%
  85. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 27779ms | 2,838,425 bytes | 55.3%
  86. ---------------------------------------------------------------------------------------------------------
  87.  
  88. Sliding Window Speed-Size Scaling (X64):
  89.  
  90.  
  91. --------------------------------------------------------------------------------------
  92. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  93. --------------------------------------------------------------------------------------
  94. dlang-prs ||(0xFF window) ||(C# Wrapper) ||: 590ms | 3,717,600 bytes | 72.4%
  95. dlang-prs ||(0xFF window ) || ||: 622ms | 3,717,600 bytes | 72.4%
  96. dlang-prs ||(0x400 window) ||(C# Wrapper) ||: 1683ms | 3,386,713 bytes | 65.9%
  97. dlang-prs ||(0x400 window) || ||: 1740ms | 3,386,713 bytes | 65.9%
  98. dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 2951ms | 3,224,633 bytes | 62.8%
  99. dlang-prs ||(0x7FF window) || ||: 3027ms | 3,224,633 bytes | 62.8%
  100. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 10460ms | 2,931,322 bytes | 57.1%
  101. dlang-prs ||(0x1FFF window) || ||: 10540ms | 2,931,322 bytes | 57.1%
  102. --------------------------------------------------------------------------------------
  103.  
  104. Decompress X64:
  105.  
  106. -------------------------------------------------------------
  107. Name || Notes || Time |
  108. -------------------------------------------------------------
  109. dlang-prs || (C# Wrapper) ||: 73ms
  110. FraGag.Compression.Prs || Byte Array/Fastest ||: 105ms
  111. -------------------------------------------------------------
  112.  
  113. Decompress X86:
  114.  
  115. -------------------------------------------------------------
  116. Name || Notes || Time |
  117. -------------------------------------------------------------
  118. dlang-prs || (C# Wrapper) ||: 77ms
  119. FraGag.Compression.Prs || Byte Array/Fastest ||: 129ms
  120. -------------------------------------------------------------
  121.  
  122. ---------------------------------
  123. Medium, Highly Compressible
  124. s01_P1.bin (135,168 bytes) | Sonic Heroes object layout, highly compressible.
  125.  
  126. Compress X64:
  127.  
  128. ---------------------------------------------------------------------------------------------------------
  129. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  130. ---------------------------------------------------------------------------------------------------------
  131. dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 29ms | 19,748 bytes | 14.6%
  132. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 79ms | 18,497 bytes | 13.6%
  133. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 113ms | 18,368 bytes | 13.5%
  134. ---------------------------------------------------------------------------------------------------------
  135.  
  136. Compress X86:
  137.  
  138. ---------------------------------------------------------------------------------------------------------
  139. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  140. ---------------------------------------------------------------------------------------------------------
  141. dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 30ms | 19,748 bytes | 14.6%
  142. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 82ms | 18,497 bytes | 13.6%
  143. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 181ms | 18,368 bytes | 13.5%
  144. ---------------------------------------------------------------------------------------------------------
  145.  
  146. Decompress X64:
  147.  
  148. -------------------------------------------------------------
  149. Name || Notes || Time |
  150. -------------------------------------------------------------
  151. dlang-prs || (C# Wrapper) ||: 4ms
  152. FraGag.Compression.Prs || Byte Array/Fastest ||: 5ms
  153. -------------------------------------------------------------
  154.  
  155. Decompress X86:
  156.  
  157. -------------------------------------------------------------
  158. Name || Notes || Time |
  159. -------------------------------------------------------------
  160. dlang-prs || (C# Wrapper) ||: 4ms
  161. FraGag.Compression.Prs || Byte Array/Fastest ||: 5ms
  162. -------------------------------------------------------------
  163.  
  164. ---------------------------------
  165. Medium, RenderWare Stream, Character Model
  166. VECTOR_LOCATOR.DFF (169,637 bytes)
  167.  
  168. Compress X64:
  169.  
  170. ---------------------------------------------------------------------------------------------------------
  171. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  172. ---------------------------------------------------------------------------------------------------------
  173. dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 80ms | 85,079 bytes | 50.1%
  174. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 238ms | 74,890 bytes | 44.1%
  175. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 385ms | 73,900 bytes | 43.5%
  176. ---------------------------------------------------------------------------------------------------------
  177.  
  178. Compress X86:
  179.  
  180. ---------------------------------------------------------------------------------------------------------
  181. Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
  182. ---------------------------------------------------------------------------------------------------------
  183. dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 81ms | 85,079 bytes | 50.1%
  184. dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 242ms | 74,890 bytes | 44.1%
  185. FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 709ms | 73,900 bytes | 43.5%
  186. ---------------------------------------------------------------------------------------------------------
  187.  
  188. Decompress X64:
  189. -------------------------------------------------------------
  190. Name || Notes || Time |
  191. -------------------------------------------------------------
  192. dlang-prs || (C# Wrapper) ||: 5ms
  193. FraGag.Compression.Prs || Byte Array/Fastest ||: 6ms
  194. -------------------------------------------------------------
  195.  
  196. Decompress X86:
  197. -------------------------------------------------------------
  198. Name || Notes || Time |
  199. -------------------------------------------------------------
  200. dlang-prs || (C# Wrapper) ||: 5ms
  201. FraGag.Compression.Prs || Byte Array/Fastest ||: 7ms
  202. -------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement