Skip to content

Conversation

@arlosi
Copy link
Contributor

@arlosi arlosi commented Jun 24, 2025

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.

Copy link
Member

@eldruin eldruin left a comment

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