Skip to content

Optimize cpptiny with single-buffer zero-copy design#15

Open
emmapowers wants to merge 1 commit into
mainfrom
modernize/4-cpptiny-optimizations
Open

Optimize cpptiny with single-buffer zero-copy design#15
emmapowers wants to merge 1 commit into
mainfrom
modernize/4-cpptiny-optimizations

Conversation

@emmapowers

Copy link
Copy Markdown
Owner

Summary

  • Replace dual read/write buffers with single shared buffer (~50% memory reduction)
  • Add zero-copy message<T>() and send<T>() API for packed structs
  • Add --unpacked flag for platforms without unaligned access support
  • Add compile-time static_assert to catch platform misuse

Test plan

  • C++ tests pass (34 tests)
  • Arduino example builds and runs
  • --unpacked mode compiles and works on ARM

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@emmapowers has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 19 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 19 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f28daaab-4cc3-46e1-b4ce-ceb1f614358d

📥 Commits

Reviewing files that changed from the base of the PR and between 65091ba and 65938fb.

📒 Files selected for processing (10)
  • bakelite/generator/cli.py
  • bakelite/generator/cpptiny.py
  • bakelite/generator/runtimes/cpptiny/cobs.h
  • bakelite/generator/templates/cpptiny.h.j2
  • bakelite/tests/generator/Makefile
  • bakelite/tests/generator/test_cli.py
  • docs/cpptiny.md
  • examples/arduino/arduino.ino
  • examples/arduino/bakelite.h
  • examples/arduino/proto.h

Comment @coderabbitai help to get the list of available commands and usage tips.

@emmapowers emmapowers force-pushed the modernize/4-cpptiny-optimizations branch from 27a0b44 to 930aade Compare April 14, 2026 14:46
@emmapowers emmapowers force-pushed the modernize/3-python-codegen branch from c724fc0 to 7def8d3 Compare April 14, 2026 14:46
@emmapowers emmapowers force-pushed the modernize/4-cpptiny-optimizations branch from 930aade to 8026e44 Compare April 14, 2026 14:53
@emmapowers emmapowers force-pushed the modernize/3-python-codegen branch 2 times, most recently from 0759207 to afb3f51 Compare April 14, 2026 15:34
@emmapowers emmapowers force-pushed the modernize/4-cpptiny-optimizations branch from 8026e44 to abfab0e Compare April 14, 2026 15:34
@emmapowers emmapowers force-pushed the modernize/3-python-codegen branch from afb3f51 to 7f9f728 Compare April 14, 2026 15:45
Base automatically changed from modernize/3-python-codegen to main April 14, 2026 16:16
- Replace dual read/write buffers with single shared buffer (~50% memory reduction)
- Add zero-copy message<T>() and send<T>() API for packed structs
- Add --unpacked flag for platforms without unaligned access support
- Add compile-time static_assert to catch platform misuse
@emmapowers emmapowers force-pushed the modernize/4-cpptiny-optimizations branch from abfab0e to 65938fb Compare April 14, 2026 16:17
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.

1 participant