# CPU vs GPU Compression Benchmark (INT8) Kompress (ModernBERT) compression time comparison — ONNX INT8 on both sides. Same code path as `POST /v1/compress` via `KompressCompressor`. ## Environment - **CPU**: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD - **GPU**: NVIDIA GeForce RTX 3070 Laptop GPU (8191 MiB) - **PyTorch**: 2.3.1+cu121 - **CUDA**: 12.1 - **Python**: 3.10.8 - **OS**: Windows 10 - **Runs per config**: 5 - **Warmup runs**: 1 ## Results | Payload | Device | Words | Mean (ms) | Median (ms) | Min (ms) | Max (ms) | StdDev (ms) | Compression | Speedup | |---------|--------|-------|-----------|-------------|----------|----------|-------------|-------------|---------| | Small (20 rows) | CPU INT8 | 22 | 456.6 | 446.1 | 429.0 | 503.7 | 31.6 | 90.9% | — | | Small (20 rows) | GPU INT8 | 22 | 313.1 | 303.4 | 296.8 | 346.1 | 20.2 | 90.9% | **1.46x** | | Medium (100 rows) | CPU INT8 | 102 | 512.9 | 516.5 | 457.1 | 569.7 | 43.2 | 98.0% | — | | Medium (100 rows) | GPU INT8 | 102 | 306.3 | 307.8 | 294.8 | 313.4 | 7.2 | 98.0% | **1.67x** | | Large (300 rows) | CPU INT8 | 302 | 527.7 | 522.6 | 504.5 | 568.5 | 24.0 | 99.3% | — | | Large (300 rows) | GPU INT8 | 302 | 414.3 | 435.4 | 361.4 | 456.1 | 41.3 | 99.3% | **1.27x** | | XLarge (500 rows) | CPU INT8 | 502 | 1008.2 | 998.9 | 956.3 | 1053.0 | 38.1 | 99.6% | — | | XLarge (500 rows) | GPU INT8 | 502 | 689.7 | 708.3 | 646.0 | 721.3 | 33.1 | 99.6% | **1.46x** | ## Summary - **Mean speedup**: 1.47x - **Best speedup**: 1.67x - **Worst speedup**: 1.27x