Skip to content

Speed up + bugfix Image.filter() for I;16*#9760

Open
akx wants to merge 7 commits into
python-pillow:mainfrom
akx:faster-filter-still
Open

Speed up + bugfix Image.filter() for I;16*#9760
akx wants to merge 7 commits into
python-pillow:mainfrom
akx:faster-filter-still

Split I16 ImageFilter loops so they are optimized by compiler

fcfbd51
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jul 9, 2026 in 0s

Performance Gate Passed

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 343 untouched benchmarks
🆕 3 new benchmarks
⏩ 2 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
test_filter[1024x1024-L-Smooth] 24.3 ms 10.1 ms ×2.4
test_filter[1024x1024-L-Sharpen] 24.2 ms 10.1 ms ×2.4
🆕 test_filter[1024x1024-I;16-Sharpen] N/A 97.7 ms N/A
🆕 test_filter[1024x1024-I;16-Smooth More] N/A 204.9 ms N/A
🆕 test_filter[1024x1024-I;16-Smooth] N/A 97.8 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-filter-still (fcfbd51) with main (b39b964)

Open in CodSpeed

Footnotes

  1. 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.