🚀 Puhu vs Pillow Performance Benchmark Report

📊 System Information

Timestamp: 2025-10-05T13:59:10.693591
Platform: macOS-15.6.1-x86_64-i386-64bit
Processor: i386
Architecture: 64bit
Python Version: 3.12.8
CPU Cores: 8
Total Memory: 16.0 GB
Pillow Version: 11.3.0
Puhu Version: 0.2.0
Test Iterations: 5
11
Operations where Puhu is faster
32
Operations where Pillow is faster
2
Operations where Puhu uses less memory
102
Total tests performed

📈 Performance Comparison Chart

📋 Detailed Results

Operation Puhu Time (ms) Pillow Time (ms) Speedup Puhu Memory (MB) Pillow Memory (MB) Winner
Load File 100X100 Rgb 0.58 0.21 1/0.35x 0.04 0.00 Pillow
Load File 100X100 Rgba 0.04 0.23 6.40x 0.00 0.00 Puhu
Load File 100X100 L 0.05 0.21 4.58x 0.00 0.00 Puhu
Load File 500X500 Rgb 0.03 0.22 6.31x 0.00 0.00 Puhu
Load File 500X500 Rgba 0.09 1.31 14.80x 0.00 0.00 Puhu
Load File 500X500 L 0.05 0.25 4.98x 0.00 0.00 Puhu
Load File 1000X1000 Rgb 0.10 0.22 2.25x 0.00 0.00 Puhu
Load File 1000X1000 Rgba 0.05 0.21 3.98x 0.00 0.00 Puhu
Load File 1000X1000 L 0.04 0.22 5.49x 0.00 0.00 Puhu
Load File 2000X2000 Rgb 0.04 0.21 6.01x 0.00 0.00 Puhu
Load File 2000X2000 Rgba 0.09 0.25 2.90x 0.00 0.00 Puhu
Load File 2000X2000 L 0.04 0.25 6.20x 0.00 0.00 Puhu
Resize 250X250 Nearest 234.37 15.70 1/0.07x 1.66 0.06 Pillow
Resize 250X250 Bilinear 708.42 18.69 1/0.03x 0.79 1.02 Pillow
Resize 250X250 Bicubic 1296.02 19.42 1/0.01x 0.07 0.00 Pillow
Resize 250X250 Lanczos 1813.85 22.20 1/0.01x 0.00 0.22 Pillow
Resize 500X500 Nearest 376.74 14.81 1/0.04x 2.74 0.00 Pillow
Resize 500X500 Bilinear 854.81 18.68 1/0.02x 1.53 0.00 Pillow
Resize 500X500 Bicubic 1492.52 20.75 1/0.01x 1.58 0.00 Pillow
Resize 500X500 Lanczos 2036.61 27.33 1/0.01x 1.53 0.01 Pillow
Resize 1500X1500 Nearest 1801.46 15.41 1/0.01x 5.90 0.00 Pillow
Resize 1500X1500 Bilinear 3044.14 94.90 1/0.03x -0.21 -1.23 Pillow
Resize 1500X1500 Bicubic 4283.61 34.13 1/0.01x -3.72 1.14 Pillow
Resize 1500X1500 Lanczos 5720.43 39.37 1/0.01x -0.93 0.00 Pillow
Crop 200X200 65.88 14.68 1/0.22x 0.01 0.00 Pillow
Crop 400X400 80.37 67.90 1/0.84x 0.00 0.01 Pillow
Crop 700X700 107.87 14.69 1/0.14x 0.00 0.00 Pillow
Rotate 90 105.13 5.43 1/0.05x 0.00 0.00 Pillow
Rotate 180 48.01 4.62 1/0.10x 0.00 0.07 Pillow
Rotate 270 49.36 4.57 1/0.09x 0.00 0.00 Pillow
Transpose Flip Left Right 68.19 4.73 1/0.07x 0.00 0.00 Pillow
Transpose Flip Top Bottom 58.30 30.58 1/0.52x 0.00 -0.04 Pillow
Convert L 287.21 15.54 1/0.05x 0.07 0.00 Pillow
Convert Rgba 67.88 7.12 1/0.10x 0.00 0.00 Pillow
Convert La 274.16 15.41 1/0.06x 0.00 0.00 Pillow
Convert Rgb 125.13 6.46 1/0.05x 0.21 0.00 Pillow
Convert Bilevel Dither 1485.78 20.48 1/0.01x 0.01 0.00 Pillow
Convert Bilevel None 498.61 15.68 1/0.03x 0.00 0.00 Pillow
Convert Palette Web 256 18094.15 31.61 1/0.00x -0.27 0.00 Pillow
Convert Palette Adaptive 256 24999.86 230.41 1/0.01x -10.62 1.96 Pillow
Convert Palette Adaptive 128 13308.16 229.56 1/0.02x -0.20 2.04 Pillow
Convert Palette Adaptive 64 7402.16 164.41 1/0.02x 0.79 0.68 Pillow
Convert Matrix 12Tuple 1765.51 24.18 1/0.01x 0.83 0.56 Pillow

💡 Performance Recommendations

⚠️ Use Pillow for intensive resizing: Pillow significantly outperforms Puhu in resize operations. Consider using Pillow for batch image processing or real-time resizing.
⚠️ Use Pillow for cropping operations: Pillow is faster for crop operations. However, consider Puhu's batch operations like resize_and_crop for combined workflows.
🧠 Memory optimization needed: Some Puhu operations use significant memory. Consider processing images in smaller batches or using streaming approaches for large datasets.
🔄 Hybrid approach: Consider using Puhu for loading and simple operations, then converting to Pillow for complex processing when needed.
📊 Profile your specific use case: These benchmarks use synthetic data. Test with your actual images and workflows for the most accurate performance comparison.