Skip to content

I/O performance improvements#19

Closed
sdomi wants to merge 6 commits intopelrun:mainfrom
sdomi:perf
Closed

I/O performance improvements#19
sdomi wants to merge 6 commits intopelrun:mainfrom
sdomi:perf

Conversation

@sdomi
Copy link
Copy Markdown

@sdomi sdomi commented Oct 21, 2025

Some minor improvements to the SD handling code, which should drastically improve the performance (~23% faster on read, ~10% faster on write; measured through USB mass storage mode with dd conv=fsync on a plenty fast SanDisk 8GB SDHC card.

branch Read Write
main ~400KB/s 250-310KB/s
perf 510KB/s 310-370KB/s

results may vary, no guarantees :p

Biggest bottleneck seems to be USB, but I bet we could squeeze 20-40% more performance on both read and write if we migrated away from the blocking SPI calls. Increasing the SD clock beyond the default 20MHz didn't make a significant difference, which leads me to believe that the majority of the time is wasted on copying data with blocking calls.

@pelrun
Copy link
Copy Markdown
Owner

pelrun commented Feb 21, 2026

I've (finally) pulled these all in, with the exception of aa5643e - you forgot that rcvr_mmc sends 8 clocks per byte :)

Thanks!

@pelrun pelrun closed this Feb 21, 2026
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