-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add libgmp for faster Integer calculations. #266
Conversation
This comment has been minimized.
This comment has been minimized.
Nice catch; I dug in and found ruby/ruby@83a0709, which led me to wonder if this was actually applicable enough to add to
... and thus file docker-library/buildpack-deps#92. 👍 |
(but this is still applicable for |
- `buildpack-deps`: `libgmp-dev` (docker-library/buildpack-deps#92) - `docker`: 18.09.3 - `ghost`: 2.16.2 - `mariadb`: 10.4.3 - `mongo`: 3.6.11 - `openjdk`: 13-ea+10 - `rabbitmq`: 3.7.13-rc.2, `RABBITMQ_VM_MEMORY_HIGH_WATERMARK=0` valid (docker-library/rabbitmq#322) - `ruby`: `libgmp` (docker-library/ruby#266)
@juusujanar I got the issue with |
jaro_winkler can't build on ruby:2.4.5-slim-stretch. Add libgmp-dev fixed it. |
Since this PR was merged To solve the issue you should install it by yourself ( I tested it with Ruby 2.5.3 & Nokogiri 1.8.4 and the described approach solved the issue. |
See #267 for where this issue is being discussed further. |
I was wondering why some large integer multiplications were taking a while, so I ran
and found that GMP wasn't included in the default images. Building these images gives me
For significantly large integers (on my machine) GMP is over 50x faster than Ruby's fallback Integer methods: https://github.com/ruby/ruby/blob/a2eb04f52dccb9b42404f8b133acb36b577e3b54/bignum.c#L2527