Repository navigation
v0.3.2
Performance optimizations
Major performance improvements across the entire encode/decode pipeline, primarily from contributions by @paracycle:
- Replaced float matrix-multiply DCT with integer-scaled AAN DCT (IJG reference implementation)
- Fixed-point integer arithmetic for color space conversion
- Eliminated hundreds of thousands of short-lived object allocations per encode
- Unrolled inner loops in DCT, block extraction, and block writing
Benchmarks (1024x1024, Ruby 4.0.2 + YJIT):
| Operation | v0.3.1 | v0.3.2 | Speedup |
|---|---|---|---|
| Encode (color, q85) | ~0.47s | ~0.16s | 2.9x |
| Decode (baseline) | ~0.63s | ~0.14s | 4.6x |
| Decode (progressive) | ~0.70s | ~0.18s | 3.9x |
No public API changes.