mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4ba3a4491e
This improve the conversion speed several times faster than before.
```
RUBYLIB= BUNDLER_ORIG_RUBYLIB= /home/mrkn/.rbenv/versions/3.0.0/bin/ruby -v -S benchmark-driver /home/mrkn/src/github.com/ruby/bigdecimal/benchmark/from_float.yml
ruby 3.0.0p0 (2020-12-25 revision 95aff21468
) [x86_64-linux]
Calculating -------------------------------------
bigdecimal 3.0.0 master
flt_e0 156.400k 783.356k i/s - 100.000k times in 0.639388s 0.127656s
flt_ep10 158.640k 777.978k i/s - 100.000k times in 0.630359s 0.128538s
flt_ep100 101.676k 504.259k i/s - 100.000k times in 0.983512s 0.198311s
flt_em10 103.439k 726.339k i/s - 100.000k times in 0.966751s 0.137677s
flt_em100 79.675k 651.446k i/s - 100.000k times in 1.255095s 0.153505s
Comparison:
flt_e0
master: 783355.6 i/s
bigdecimal 3.0.0: 156399.5 i/s - 5.01x slower
flt_ep10
master: 777977.6 i/s
bigdecimal 3.0.0: 158639.7 i/s - 4.90x slower
flt_ep100
master: 504259.4 i/s
bigdecimal 3.0.0: 101676.5 i/s - 4.96x slower
flt_em10
master: 726338.6 i/s
bigdecimal 3.0.0: 103439.2 i/s - 7.02x slower
flt_em100
master: 651446.3 i/s
bigdecimal 3.0.0: 79675.3 i/s - 8.18x slower
```
https://github.com/ruby/bigdecimal/commit/5bdaedd530
https://github.com/ruby/bigdecimal/commit/9bfff57f90
https://github.com/ruby/bigdecimal/commit/d071a0abbb
46 lines
1.4 KiB
Ruby
46 lines
1.4 KiB
Ruby
# coding: utf-8
|
|
|
|
bigdecimal_version = '3.0.0'
|
|
|
|
Gem::Specification.new do |s|
|
|
s.name = "bigdecimal"
|
|
s.version = bigdecimal_version
|
|
s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
|
|
s.email = ["mrkn@mrkn.jp"]
|
|
|
|
s.summary = "Arbitrary-precision decimal floating-point number library."
|
|
s.description = "This library provides arbitrary-precision decimal floating-point number class."
|
|
s.homepage = "https://github.com/ruby/bigdecimal"
|
|
s.license = "Ruby"
|
|
|
|
s.require_paths = %w[lib]
|
|
s.extensions = %w[ext/bigdecimal/extconf.rb]
|
|
s.files = %w[
|
|
bigdecimal.gemspec
|
|
ext/bigdecimal/bigdecimal.c
|
|
ext/bigdecimal/bigdecimal.h
|
|
ext/bigdecimal/bits.h
|
|
ext/bigdecimal/feature.h
|
|
ext/bigdecimal/missing.c
|
|
ext/bigdecimal/missing.h
|
|
ext/bigdecimal/missing/dtoa.c
|
|
ext/bigdecimal/static_assert.h
|
|
lib/bigdecimal.rb
|
|
lib/bigdecimal/jacobian.rb
|
|
lib/bigdecimal/ludcmp.rb
|
|
lib/bigdecimal/math.rb
|
|
lib/bigdecimal/newton.rb
|
|
lib/bigdecimal/util.rb
|
|
sample/linear.rb
|
|
sample/nlsolve.rb
|
|
sample/pi.rb
|
|
]
|
|
|
|
s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
|
|
|
s.add_development_dependency "fiddle"
|
|
s.add_development_dependency "rake", ">= 12.3.3"
|
|
s.add_development_dependency "rake-compiler", ">= 0.9"
|
|
s.add_development_dependency "minitest", "< 5.0.0"
|
|
s.add_development_dependency "irb"
|
|
end
|