Speed up alpha_composite, matrix, negative, quantize#9740
Conversation
Merging this PR will improve performance by ×3.8
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_invert[1024x1024-LA] |
24.9 ms | 4.5 ms | ×5.6 |
| ⚡ | test_invert[1024x1024-RGBA] |
24.9 ms | 4.5 ms | ×5.6 |
| ⚡ | test_invert[1024x1024-RGB] |
24.9 ms | 4.5 ms | ×5.5 |
| ⚡ | test_invert[1024x1024-L] |
6.3 ms | 1.2 ms | ×5.4 |
| ⚡ | test_matrix_convert[1024x1024-L-matrix0] |
13.5 ms | 6.5 ms | ×2.1 |
| ⚡ | test_matrix_convert[1024x1024-RGB-matrix1] |
28.9 ms | 19.8 ms | +46.1% |
| 🆕 | test_alpha_composite[1024x1024-LA-mixed] |
N/A | 26.7 ms | N/A |
| 🆕 | test_alpha_composite[1024x1024-LA-opaque] |
N/A | 26.8 ms | N/A |
| 🆕 | test_alpha_composite[1024x1024-LA-transparent] |
N/A | 9.6 ms | N/A |
| 🆕 | test_alpha_composite[1024x1024-RGBA-mixed] |
N/A | 26.7 ms | N/A |
| 🆕 | test_alpha_composite[1024x1024-RGBA-opaque] |
N/A | 26.8 ms | N/A |
| 🆕 | test_alpha_composite[1024x1024-RGBA-transparent] |
N/A | 9.6 ms | N/A |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing akx:faster-loops-small (633c164) with main (6590b1b)
Footnotes
-
2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
…cise composition variants better
|
|
It's actually an expansion of the old |
Refs #9649, #9675, #9736, #9737, #9738, #9739 (same series, same techniques).
These were a couple lines each, so I figured I'd bundle them into one PR.