Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve MarkedCircularBuffer performance. #993

Merged
merged 1 commit into from
May 3, 2019

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented May 3, 2019

Motivation:

While CircularBuffer has an inlinable implementation to improve performance, MarkedCircularBuffer
never got enhanced to have it. This harms performance in many core NIO libraries which heavily use
MCB, forcing heap allocations on almost all MCB operations.

Modifications:

  • Make basically everything on MarkedCircularBuffer inlinable.

Result:

Faster code.

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label May 3, 2019
@Lukasa Lukasa added this to the 2.1.0 milestone May 3, 2019
@Lukasa Lukasa requested a review from weissi May 3, 2019 07:59
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great, tiny nit sorry

Motivation:

While CircularBuffer has an inlinable implementation to improve performance, MarkedCircularBuffer
never got enhanced to have it. This harms performance in many core NIO libraries which heavily use
MCB, forcing heap allocations on almost all MCB operations.

Modifications:

- Make basically everything on MarkedCircularBuffer inlinable.

Result:

Faster code.
@Lukasa Lukasa force-pushed the cb-marked-circular-buffer-is-slow branch from e9bd29c to 27acd2d Compare May 3, 2019 09:10
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

@weissi weissi merged commit ae5564e into apple:master May 3, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants