Skip to content

vello_bench: Add more varied pixmap benchmarks - #1842

Open
LaurenzV wants to merge 1 commit into
laurenz/pixmap_unpremulfrom
laurenz/more_benches
Open

vello_bench: Add more varied pixmap benchmarks#1842
LaurenzV wants to merge 1 commit into
laurenz/pixmap_unpremulfrom
laurenz/more_benches

Conversation

@LaurenzV

Copy link
Copy Markdown
Collaborator

This PR extend the existing benchmarks to cover three different cases: A fully opaque image, a fully translucent image and an interleaved image, where the two alternate. This is in preparation for a follow-up PR which adds some more optimizations to show that they are worth it.

@LaurenzV

Copy link
Copy Markdown
Collaborator Author

Hmm okay, I'm not completely sure whether the optimization is going to be worth it. But I think it's useful regardless to have some more varied benchmarks for this!

@LaurenzV
LaurenzV requested a review from grebmeg August 22, 2026 17:53
fn interleaved_pixels(pixel_count: usize) -> Vec<u8> {
let mut rgba = Vec::with_capacity(pixel_count * 4);
for index in 0..pixel_count {
let pixel = if (index / 16).is_multiple_of(2) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SIMD kernel processes 16 pixels per chunk, so this makes every vector uniformly opaque or translucent. Could we alternate every eight pixels, or add a separate mixed-lanes case? That would preserve the previous benchmark’s coverage of mixed alpha values within one SIMD iteration.

@LaurenzV
LaurenzV force-pushed the laurenz/more_benches branch from 645840a to 3da9c85 Compare August 24, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants