Skip to content

perf: implement fill_contiguous#232

Merged
eldruin merged 1 commit into
rust-embedded-community:masterfrom
arlosi:fill-contig
Jun 27, 2025
Merged

perf: implement fill_contiguous#232
eldruin merged 1 commit into
rust-embedded-community:masterfrom
arlosi:fill-contig

Conversation

@arlosi

@arlosi arlosi commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

A significant amount of CPU time was being spent filling rectangles in my application. I traced most of the problem to set_pixel being somewhat slow for large rectangular areas.

By implementing fill_contiguous much of the bounds checking and control flow changes for rotation are lifted outside the hot path.

Tested on STM32G0 with 0.96 128x64 OLED over I2C.

@eldruin eldruin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good to me, thank you!

@eldruin
eldruin merged commit 79cb629 into rust-embedded-community:master Jun 27, 2025
11 checks passed
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