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

use @convention(c) for malloc/realloc/free in ByteBuffer #267

Merged
merged 5 commits into from
Apr 3, 2018

Conversation

weissi
Copy link
Member

@weissi weissi commented Apr 3, 2018

Motivation:

Adding @convention(c) is beneficial for performance of variables bound
to C functions so we should do that in ByteBuffer.

Modifications:

Adds @convention(c) to the malloc/realloc/free constants in ByteBuffer

Result:

Slightly better performance.

@weissi weissi requested review from Lukasa and normanmaurer April 3, 2018 08:48
@weissi weissi added the 🔨 semver/patch No public API change. label Apr 3, 2018
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

LGTM, merge when the tests pass.

@Lukasa Lukasa added this to the 1.4.0 milestone Apr 3, 2018
Motivation:

Adding @convention(c) is beneficial for performance of variables bound
to C functions so we should do that in ByteBuffer.

Modifications:

Adds @convention(c) to the malloc/realloc/free constants in ByteBuffer

Result:

Slightly better performance.
@normanmaurer normanmaurer merged commit 2af28a7 into apple:master Apr 3, 2018
@normanmaurer
Copy link
Member

@weissi thanks

@weissi weissi deleted the jw-bb-malloc branch April 9, 2018 08:44
# 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.

3 participants