Cody Mack
2014-09-01 12:51:56 UTC
Hi,
Regarding issue #8937 (https://github.com/rust-lang/rust/issues/8937),
add a BigDecimal type, there is discussion about wrapping GMP, and
even possibly replacing Rust's current BigInt with this wrapper. One
comment mentions that Rust's current BigInt is ~100x slower than GMP
in some cases. However, GMP is licensed under LGPL.
1. Are there benchmarks displayed somewhere for comparison of BigInt
vs. GMP? It would be helpful to know cases from where the factor 100x
came.
2. Haskell's GHC
(https://ghc.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) takes the
approach of having two implementations available for use: a
pure-Haskell implementation and a wrapper around GMP. The former does
not have the performance of the latter yet has GHC's BSD-style
license. Would there be any objections to having a pure-Rust
implementation and a GMP-wrapper implementation which users could
choose? Starting out, the pure-Rust implementation would not have the
years of optimization which GMP has, but effort could be made to
improve the pure-Rust performance.
Thanks.
Regarding issue #8937 (https://github.com/rust-lang/rust/issues/8937),
add a BigDecimal type, there is discussion about wrapping GMP, and
even possibly replacing Rust's current BigInt with this wrapper. One
comment mentions that Rust's current BigInt is ~100x slower than GMP
in some cases. However, GMP is licensed under LGPL.
1. Are there benchmarks displayed somewhere for comparison of BigInt
vs. GMP? It would be helpful to know cases from where the factor 100x
came.
2. Haskell's GHC
(https://ghc.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) takes the
approach of having two implementations available for use: a
pure-Haskell implementation and a wrapper around GMP. The former does
not have the performance of the latter yet has GHC's BSD-style
license. Would there be any objections to having a pure-Rust
implementation and a GMP-wrapper implementation which users could
choose? Starting out, the pure-Rust implementation would not have the
years of optimization which GMP has, but effort could be made to
improve the pure-Rust performance.
Thanks.