Skip to content

use zlib-rs instead of linking to zlib #38

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

iximeow
Copy link
Contributor

@iximeow iximeow commented Mar 27, 2025

this is independent from the lazy_static! change, but seems to be somewhat (15%?) faster than calling out to zlib. my intuition is that perhaps by compiling together there's some better inlining or something, but i really don't know specifics on why this is so much faster.

i've seen about 15% on a 9950x, at least, and @indirect i think has seen similar on an M4, but i hear @segiddins has seen this be slower on an M2. so might not be as clear a win. ymmv!

this is independent from the `lazy_static!` change, but seems to be
somewhat (15%?) faster than calling out to zlib. my intuition is that
perhaps by compiling together there's some better inlining or something,
but i really don't know specifics on why this is so much faster.
@indirect
Copy link
Member

I saw same speed or a hair slower on M4 with this change (1.05 to 1.1s with this change, 1.045 to 1.8s without). It's probably worth merging since we run on x86 in production, and this seems to be a lot faster there, especially if we include PGO.

@indirect indirect merged commit 80666ca into rubytogether:main Mar 27, 2025
2 checks passed
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.

2 participants