Skip to content
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

[rebased] Use ragel-bitmap for less memory #1623

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

ahorek
Copy link
Contributor

@ahorek ahorek commented Oct 28, 2024

this is a rebased version of #1343

it significantly reduces resident memory by -39MB
but there are downsides:

performance
-9% mri 3.4.0 (dev)
-1% mri 3.4.0+yjit
-10% jruby
0% jruby+indy
-10% truffleruby
and +6% runtime allocations

however, it's a micro-benchmark and differences are marginal, so it's unlikely to be a bottleneck in a real application.

@eval eval merged commit 64b5d72 into mikel:2-8-stable Oct 29, 2024
15 checks passed
@jrafanie
Copy link

@ahorek can you share your benchmark script? I'd like to test in my project but am not sure if the parsers are eager required via require 'mail' or if I need to do something different to demonstrate the benefits and tradeoffs of this change.

Thanks!

@ahorek
Copy link
Contributor Author

ahorek commented Oct 29, 2024

nothing special

file = File.binread("email.eml")
Mail.new(file).to_s

https://github.com/evanphx/benchmark-ips
https://github.com/zombocom/derailed_benchmarks

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.

3 participants