mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-11-10 14:10:56 +01:00
MRI's BigInt use GMP under the hood if available, and if not
fallbacks to an homemade implementation with much worse performance.
Without GMP:
```
>> Benchmark.realtime { Integer('1' * (10 ** 7)) }
=> 13.80743500002427
```
With GMP
```
>> Benchmark.realtime { Integer('1' * (10 ** 7)) }
=> 0.4098639999865554
```
macOS not being a common production platform, it's not a huge deal
but it would still preferable to compile with `gmp.h` if present.
I'd also suggest to print a warning if compiling on macOS and gmp
isn't installed, but I don't know if it's desirable.
NB: `--with-gmp-dir` was only added recently, so this will only
apply to MRI >= 3.2, as well as rubies on which this flag was backported.
4 lines
48 B
Bash
Executable file
4 lines
48 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
bats ${CI:+--tap} test "$@"
|