Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Benchmarks:
- CPU: i7 4790k @ 4.5GHz
- RAM: 24GB CL9 1866MHz
- Each benchmark is an average of 5 runs.
- Benchmark consists of compressing/decompressing a file and writing
- it onto a solid state drive.
- As the window size for FraGag.Compression.Prs is not modifiable, only
- the default has been included. For FraGag.Compression.Prs, the fastest code path/overload
- has been used for compression/decompression, being the array and MemoryStream path respectively.
- Decompression benchmarks are performed on files output by FraGag.Compression.Prs.
- All percentages are rounded down (I'm lazy).
- dlang-prs has been compiled under LDC2 (LDC 1.11.0-beta1)
- --------------------------------
- tl;dr Head to head.
- Aggregated from arbitrary tests below.
- In relative decompression speed, the smaller size tests are ignored because I did not measure
- time accurately enough (4ms and 5ms aren't relatively speaking accurate enough for proper comparison).
- X64 Compression:
- --------------------------------------------------------------------------------------------
- Name | Relative Speed % | Relative Size % | Average Compression Ratio %
- --------------------------------------------------------------------------------------------
- FraGag.Compression.Prs | 100 | 100 | 37.4
- dlang-prs (Wrapper) | 151.8 | 101.7 | 38.2
- dlang-prs (0x7FF Buffer) | 452.7 | 112.0 | 42.5
- --------------------------------------------------------------------------------------------
- X86 Compression:
- --------------------------------------------------------------------------------------------
- Name | Relative Speed % | Relative Size % | Average Compression Ratio %
- --------------------------------------------------------------------------------------------
- FraGag.Compression.Prs | 100 | 100 | 37.4
- dlang-prs (Wrapper) | 268.7 | 101.7 | 38.2
- dlang-prs (0x7FF Buffer) | 806.6 | 112.0 | 42.5
- --------------------------------------------------------------------------------------------
- X64 Decompression:
- ----------------------------------------------
- Name | Relative Speed % |
- ----------------------------------------------
- FraGag.Compression.Prs | 100 |
- dlang-prs (Wrapper) | 143.8 |
- ----------------------------------------------
- X86 Decompression:
- ----------------------------------------------
- Name | Relative Speed % |
- ----------------------------------------------
- FraGag.Compression.Prs | 100 |
- dlang-prs (Wrapper) | 167.5 |
- ----------------------------------------------
- I can't get fuzziqer's original implementation compiled so I couldn't add it here.
- --------------------------------
- Large, Windows Executable
- TSonic_win.exe (5,132,288 bytes)
- Compress X64:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 9551ms | 2,931,322 bytes | 57.1%
- dlang-prs ||(0x1FFF window) || ||: 9573ms | 2,931,322 bytes | 57.1%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 14384ms | 2,838,425 bytes | 55.3%
- ---------------------------------------------------------------------------------------------------------
- Compress X86:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 9498ms | 2,931,322 bytes | 57.1%
- dlang-prs ||(0x1FFF window) || ||: 9510ms | 2,931,322 bytes | 57.1%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 27779ms | 2,838,425 bytes | 55.3%
- ---------------------------------------------------------------------------------------------------------
- Sliding Window Speed-Size Scaling (X64):
- --------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- --------------------------------------------------------------------------------------
- dlang-prs ||(0xFF window) ||(C# Wrapper) ||: 590ms | 3,717,600 bytes | 72.4%
- dlang-prs ||(0xFF window ) || ||: 622ms | 3,717,600 bytes | 72.4%
- dlang-prs ||(0x400 window) ||(C# Wrapper) ||: 1683ms | 3,386,713 bytes | 65.9%
- dlang-prs ||(0x400 window) || ||: 1740ms | 3,386,713 bytes | 65.9%
- dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 2951ms | 3,224,633 bytes | 62.8%
- dlang-prs ||(0x7FF window) || ||: 3027ms | 3,224,633 bytes | 62.8%
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 10460ms | 2,931,322 bytes | 57.1%
- dlang-prs ||(0x1FFF window) || ||: 10540ms | 2,931,322 bytes | 57.1%
- --------------------------------------------------------------------------------------
- Decompress X64:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 73ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 105ms
- -------------------------------------------------------------
- Decompress X86:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 77ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 129ms
- -------------------------------------------------------------
- ---------------------------------
- Medium, Highly Compressible
- s01_P1.bin (135,168 bytes) | Sonic Heroes object layout, highly compressible.
- Compress X64:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 29ms | 19,748 bytes | 14.6%
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 79ms | 18,497 bytes | 13.6%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 113ms | 18,368 bytes | 13.5%
- ---------------------------------------------------------------------------------------------------------
- Compress X86:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 30ms | 19,748 bytes | 14.6%
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 82ms | 18,497 bytes | 13.6%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 181ms | 18,368 bytes | 13.5%
- ---------------------------------------------------------------------------------------------------------
- Decompress X64:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 4ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 5ms
- -------------------------------------------------------------
- Decompress X86:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 4ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 5ms
- -------------------------------------------------------------
- ---------------------------------
- Medium, RenderWare Stream, Character Model
- VECTOR_LOCATOR.DFF (169,637 bytes)
- Compress X64:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 80ms | 85,079 bytes | 50.1%
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 238ms | 74,890 bytes | 44.1%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 385ms | 73,900 bytes | 43.5%
- ---------------------------------------------------------------------------------------------------------
- Compress X86:
- ---------------------------------------------------------------------------------------------------------
- Name ||Search Buf. Size|| Notes || Time | Final Size | % orig size
- ---------------------------------------------------------------------------------------------------------
- dlang-prs ||(0x7FF window) ||(C# Wrapper) ||: 81ms | 85,079 bytes | 50.1%
- dlang-prs ||(0x1FFF window) ||(C# Wrapper) ||: 242ms | 74,890 bytes | 44.1%
- FraGag.Compression.Prs ||(0x1FF0 window) || MemoryStream/Fastest ||: 709ms | 73,900 bytes | 43.5%
- ---------------------------------------------------------------------------------------------------------
- Decompress X64:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 5ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 6ms
- -------------------------------------------------------------
- Decompress X86:
- -------------------------------------------------------------
- Name || Notes || Time |
- -------------------------------------------------------------
- dlang-prs || (C# Wrapper) ||: 5ms
- FraGag.Compression.Prs || Byte Array/Fastest ||: 7ms
- -------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement