Speed up Image.filter() for I;16* - #9760
Conversation
Merging this PR will improve performance by ×2.5
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_filter[1237x811-L-Smooth] |
23.2 ms | 9.5 ms | ×2.5 |
| ⚡ | test_filter[1237x811-L-Sharpen] |
23.2 ms | 9.5 ms | ×2.4 |
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 (80b9256) with main (3220aca)
Footnotes
-
335 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. ↩
This comment was marked as outdated.
This comment was marked as outdated.
e2022ed to
525c545
Compare
3ca13f7 to
4666708
Compare
c448421 to
7ce5129
Compare
Image.filter() for I;16*Image.filter() for I;16*
This comment was marked as resolved.
This comment was marked as resolved.
Image.filter() for I;16*Image.filter() for I;16*
|
Updated from |
3dbd362 to
14c9690
Compare
| } | ||
| } else { | ||
| } else if (im->type == IMAGING_TYPE_SPECIAL) { | ||
| // Check for I;16 mode once, not per pixel |
There was a problem hiding this comment.
| // Check for I;16 mode once, not per pixel |
Once this is merged, I don't think it's obvious what the comment is referring to
| } | ||
| } else { | ||
| } else if (im->type == IMAGING_TYPE_SPECIAL) { | ||
| // Check for I;16 mode once, not per pixel |
There was a problem hiding this comment.
| // Check for I;16 mode once, not per pixel |
Also adds LA to some tests as a side effect
Co-authored-by: Aarni Koskela <akx@iki.fi>
bcb47ed to
80b9256
Compare
Follows up on #8438; same split-by-mode optimization technique as in #9737.
Also fixes up things around
ImageFilter:test_consistency_*tests didn't use themodeparametrization at all and just ran the same test N timestest_crashclaimed ImageFilter would crash on images smaller than the kernel; it doesn't, it just returns the same image.test_crashhad hadassert_no_exceptionsometime before 3ec5059?Kernelclaimed only a couple of modes were supported.The correctness bugs from #9786 are fixed here too.