Peter Zhu
|
12889fad41
|
[ruby/bigdecimal] Remove symbol defs in missing.h for old Rubies
Commit 2885514 added these to support Ruby 2.1. The rb_sym2str function
is defined since Ruby 2.2.
https://github.com/ruby/bigdecimal/commit/be366c9cf2
|
2022-09-19 23:40:49 +09:00 |
|
Peter Zhu
|
a44f48cadc
|
[ruby/bigdecimal] Remove array defs in missing.h for old Rubies
Commit 02b6053 added these to support Ruby 2.0.0. The rb_array_const_ptr
function is defined since Ruby 2.3.
https://github.com/ruby/bigdecimal/commit/678699ca1b
|
2022-09-19 23:40:48 +09:00 |
|
Nobuyoshi Nakada
|
673759328c
|
[ruby/bigdecimal] Remove checks for struct RRational and struct RComplex
These are used to see only if `RRATIONAL` and `RCOMPLEX` are
available, however, these two are macros and can be checked with
`#ifdef` directly.
https://github.com/ruby/bigdecimal/commit/175bbacd43
|
2022-07-14 21:02:02 +09:00 |
|
Benoit Daloze
|
0764d323d8
|
Fix -Wundef warnings for patterns #if HAVE
* See [Feature #17752]
* Using this to detect them:
git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
|
2021-05-04 14:56:55 +02:00 |
|
Kenta Murata
|
4ba3a4491e
|
[ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa
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
|
2021-01-13 02:11:18 +09:00 |
|
Kenta Murata
|
71f0dd339b
|
[ruby/bigdecimal] Move some definitions to missing.h
https://github.com/ruby/bigdecimal/commit/c2b22cc8b3
https://github.com/ruby/bigdecimal/commit/8cbca8481d
https://github.com/ruby/bigdecimal/commit/f05aecf673
|
2021-01-04 13:29:10 +09:00 |
|