vello_bench: Add more varied pixmap benchmarks - #1842
Open
LaurenzV wants to merge 1 commit into
Open
Conversation
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! |
grebmeg
approved these changes
Aug 24, 2026
| 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) { |
Collaborator
There was a problem hiding this comment.
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
force-pushed
the
laurenz/more_benches
branch
from
August 24, 2026 07:00
645840a to
3da9c85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.