Conversation
2e5b627 to
dea022b
Compare
edbc074 to
91a42e8
Compare
|
CodSpeed isn't showing a report here because all the benchmarks are new, but you can see them in the report here. The varied range of speeds suggests that these optimizations do take, but I'm not sure if the last commit, the autovectorisation, works as well as it does on clang/ARM. |
|
Want to split the benchmarks to their own PR? |
* de-parametrize test_not_equal_mode_1 * add type annotations * test the Image's behavior, not the Core's
Co-authored-by: Yay295 <Yay295@gmail.com>
dd17015 to
0dbb7f9
Compare
Merging this PR will improve performance by ×32
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_equality[1237x811-RGB-inverted] |
49,211 µs | 67.4 µs | ×730 |
| ⚡ | test_equality[1237x811-RGBA-inverted] |
52,269.3 µs | 73.7 µs | ×710 |
| ⚡ | test_equality[1237x811-LA-inverted] |
30,972.3 µs | 67.6 µs | ×460 |
| ⚡ | test_equality[1237x811-I;16-inverted] |
25,080.7 µs | 67.5 µs | ×370 |
| ⚡ | test_equality[1237x811-L-inverted] |
12,659.3 µs | 67.1 µs | ×190 |
| ⚡ | test_equality[1237x811-RGBA-one-pixel] |
54.6 ms | 3.7 ms | ×15 |
| ⚡ | test_equality[1237x811-I;16-one-pixel] |
25.7 ms | 1.9 ms | ×13 |
| ⚡ | test_equality[1237x811-L-one-pixel] |
12,877.2 µs | 985.3 µs | ×13 |
| ⚡ | test_equality[1237x811-RGB-one-pixel] |
51.3 ms | 4 ms | ×13 |
| ⚡ | test_equality[1237x811-LA-one-pixel] |
32.1 ms | 4 ms | ×8.1 |
| ⚡ | test_equality[1237x811-RGBA-equal] |
57.7 ms | 7.4 ms | ×7.8 |
| ⚡ | test_equality[1237x811-I;16-equal] |
26.3 ms | 3.7 ms | ×7 |
| ⚡ | test_equality[1237x811-L-equal] |
13.1 ms | 1.9 ms | ×6.9 |
| ⚡ | test_equality[1237x811-RGB-equal] |
52.7 ms | 7.9 ms | ×6.7 |
| ⚡ | test_equality[1237x811-LA-equal] |
33.2 ms | 7.9 ms | ×4.2 |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing akx:image-equals-new (8602567) with main (d13f288)
Footnotes
-
338 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. ↩
|
And the memory usage comparison that the benchmark doesn't capture shows that comparisons now require no extra allocations: On a 2053x2039 image:
|
0dbb7f9 to
8602567
Compare
Closes #7260 (supersedes it).
I added a benchmark, and stacked the tests from the original (adjusted to pass lints, etc.) to be before the reimplementation in the PR, then added some more corner case tests.
I verified, with interactive rebase, that the tests pass just before the new handler is added, and then separately afterwards.
Local benchmark score improvement (unsurprising, and this isn't measuring peak memory usage improvements!):
EDIT: added one more commit for autovectorisation to make RGB (likely very common!) and LA even faster (at least on my hardware):