RTEMS | score: Speed up the red-black tree rebalance (!1524)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Thu Oct 8 03:47:45 UTC 2026
Sebastian Huber created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1524
Project:Branches: sebhub/rtems:up/rbtree-perf to rtems/rtos/rtems:main
Author: Sebastian Huber
## Summary
Issue #5804: Speed up the red-black tree rebalance
The rebalance of the red-black tree loads and stores more than it needs.
The series adds a performance test of the tree, translates the
`bsd-tree.h` macros into static inline functions, flattens the node and
restructures the control flow of the rebalance. The issue gives the A/B
measurements of eight boards.
The tests `sprbtree01` and `ts-unit-no-clock-0` pass on the boards of all
eight targets, for each of the commits 2 to 4.
## AI Details
<!-- Make sure you have read our statement at https://www.rtems.org/generative-ai/ -->
### Prompt used
None as a single prompt. The work was done in an interactive Claude Code
session on the RTEMS tree. The task was to measure the runtime of the
red-black tree, to find the work of the rebalance which it does not need,
and to remove it. Each change was directed and reviewed.
### AI model used
Claude Opus 5.5 (claude-opus-5-5), through Claude Code.
### How AI was used for the contribution
- ( ) Formatting
- (x) Test creation.
- (x) Code comments.
- ( ) The entire contribution was generated using AI
- ( ) AI code completion such as Copilot in VSCode.
The performance test, the translation of the macros, the implementation
and the A/B measurements were produced in that session under my
direction, and the commit messages were drafted there.
### Access
I have not used a product which claims copyright in its output, and I have
legitimate access to the one I used.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1524
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-agcz1vg195k7x9ogvpptcxrwo-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261008/b9870b40/attachment.htm>
More information about the bugs
mailing list