Skip to content

Use RingBuffer in internal.h/c++ instead of std::list#5689

Merged
jasnell merged 1 commit intomainfrom
jasnell/streams-cleanup-internal-ringbuffer
Dec 15, 2025
Merged

Use RingBuffer in internal.h/c++ instead of std::list#5689
jasnell merged 1 commit intomainfrom
jasnell/streams-cleanup-internal-ringbuffer

Conversation

@jasnell
Copy link
Copy Markdown
Collaborator

@jasnell jasnell commented Dec 12, 2025

The RingBuffer impl provides better performance characteristics for the internal stream buffering needs including reduced memory overhead, improved cache locality, and fewer allocations. This is a small tweak as part of ongoing efforts to optimize/improve the streams impls.

As a reminder, the RingBuffer impl was originally done by claude. This PR applies some manual fixups for a couple of things claude got wrong initially.

@jasnell jasnell requested review from a team as code owners December 12, 2025 23:44
@jasnell jasnell added streams technical debt Label used for changes that address technical debt labels Dec 13, 2025
@jasnell jasnell force-pushed the jasnell/streams-cleanup-internal-ringbuffer branch from 72852ac to e8bfa68 Compare December 13, 2025 02:00
@jasnell jasnell marked this pull request as draft December 13, 2025 04:29
@jasnell

This comment was marked as resolved.

@jasnell jasnell marked this pull request as ready for review December 15, 2025 20:43
@jasnell jasnell force-pushed the jasnell/streams-cleanup-internal-ringbuffer branch 2 times, most recently from ee42f32 to 655a0f0 Compare December 15, 2025 21:06
The RingBuffer impl provides better performance characteristics for
the internal stream buffering needs including reduced memory overhead,
improved cache locality, and fewer allocations. This is a small tweak
as part of ongoing efforts to optimize/improve the streams impls.
@jasnell jasnell force-pushed the jasnell/streams-cleanup-internal-ringbuffer branch from 655a0f0 to 5f1848c Compare December 15, 2025 21:55
@jasnell jasnell merged commit 80d9d76 into main Dec 15, 2025
43 of 45 checks passed
@jasnell jasnell deleted the jasnell/streams-cleanup-internal-ringbuffer branch December 15, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams technical debt Label used for changes that address technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants