Age | Commit message (Collapse) | Author |
|
Treats:
#allbits?
#anybits?
#nobits?
#succ
#pred
#chr`
#to_s
#+
#-
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
This reverts commit fc456adc6a62d09b755243b8c8f190934b9965d6.
It broke the CI check.
https://github.com/ruby/ruby/runs/4207922247?check_suite_focus=true#step:3:4
```
numeric.c:3518: * 255.chr(Encoding::UTF_8) # => "ÿ"
Error: Process completed with exit code 1.
```
|
|
Treats:
#allbits?
#anybits?
#nobits?
#succ
#pred
#chr`
#to_s
#+
#-
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
|
|
Treats:
#eql?
#<+>
#floor
#ceil
#round
#truncate
#step
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5027
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5027
|
|
|
|
Treated:
#@-
#fdiv
#div
#abs
#zero?
#nonzero?
#to_int
#positive?
#negative?
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Treats:
Numeric#coerce
Numeric#clone
Numeric#dup
Numeric#@+ (unary plus)
Numeric#i
Float#coerce
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Treats Numeric#remainder and Integer#remainder.
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Treats:
Integer#divmod
Float#divmod
Numeric#divmod
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Treats Integer#% and Float#%.
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4926
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4837
Merged-By: nobu <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4821
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4816
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4806
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4805
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4783
|
|
rb_num_negative_int_p is equivalent to calling the "<" method on
Integer (and checking whether it is overridden), where in this case we
are interested in whether the "actual" value can fit inside an unsigned
int.
This also was slow because rb_num_negative_int_p calls
rb_method_basic_definition_p, doing a method lookup to check for < being
overridden.
This replaces the check in both rb_fix2uint and rb_fix2ushort with FIXNUM_NEGATIVE_P which simply checks
whether the VALUE is signed.
Notes:
Merged: https://github.com/ruby/ruby/pull/4747
|
|
ndigits higher than 14 can result in values that are slightly too
large due to floating point limitations. Converting to rational
for the calculation and then back to float fixes these issues.
Fixes [Bug #14635]
Fixes [Bug #17183]
Co-authored by: Yusuke Endoh <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/4682
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4695
Merged-By: nobu <[email protected]>
|
|
This speeds up performance by multiple orders of magnitude for
large integers.
Fixes [Bug #14391]
Co-authored-by: tompng (tomoya ishida) <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/4584
|
|
The previous implementation could result in a returned
float that is 1/(10**ndigits) too low. First try adding
one before dividing, and if that results in a value that is
greater than the initial number, then try the original
calculation.
Spec added for ciel, but the issue doesn't appear to affect
ciel, at least not for the same number. If the issue does
effect ciel, a similar fix could probably work for it.
Fixes [Bug #18018]
Notes:
Merged: https://github.com/ruby/ruby/pull/4681
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4654
|
|
|
|
* Improve perfomance for Integer#size method [Feature #17135]
* re-run ci
* Let MJIT frame skip work for Integer#size
Co-authored-by: Takashi Kokubun <[email protected]>
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Depending on the float range, there could be an off-by-one error,
where the last result that should be in the range was missed. Fix
this by checking if the computed value for the expected value
outside the range is still inside the range, and if so, increment
the step size.
Fixes [Bug #16612]
Notes:
Merged: https://github.com/ruby/ruby/pull/4434
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Previously, the result was incorrect:
4.remainder(-Float::INFINITY)
Before: => NaN
After: => 4
4.2.remainder(-Float::INFINITY)
Before: => NaN
After: => 4.2
Fixes [Bug #6120]
Notes:
Merged: https://github.com/ruby/ruby/pull/4257
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4135
|
|
forgotten in https://github.com/ruby/ruby/pull/4018
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_integer.yml --filter '(comp|uminus)'
before --jit: ruby 3.0.0dev (2020-12-23T05:41:44Z master 0dd4896175) +JIT [x86_64-linux]
after --jit: ruby 3.0.0dev (2020-12-23T06:25:41Z master 8887d78992) +JIT [x86_64-linux]
last_commit=Allow inlining Integer#-@ and #~
Calculating -------------------------------------
before --jit after --jit
mjit_comp(1) 44.006M 70.417M i/s - 40.000M times in 0.908967s 0.568042s
mjit_uminus(1) 44.333M 68.422M i/s - 40.000M times in 0.902255s 0.584603s
Comparison:
mjit_comp(1)
after --jit: 70417331.4 i/s
before --jit: 44005980.4 i/s - 1.60x slower
mjit_uminus(1)
after --jit: 68422468.8 i/s
before --jit: 44333371.0 i/s - 1.54x slower
```
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3886
|
|
sequences (#3870)
[Bug #17218]
[ruby-core:100312]
Notes:
Merged-By: mrkn <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3769
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3769
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3769
|
|
* numeric.c: prohibit zero step in Numeric#step
* range.c: prohibit zero step in Range#step
* Fix ruby-spec
[Feature #15573]
Notes:
Merged: https://github.com/ruby/ruby/pull/3689
Merged-By: mrkn <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3589
|
|
|
|
|
|
The error message has an integer overflow because it treats an unsigned int as a signed int.
Before:
```
> 3_000_000_000.chr
-1294967296 out of char range (RangeError)
```
After:
```
> 3_000_000_000.chr
3000000000 out of char range (RangeError)
```
Redmine ticket: https://bugs.ruby-lang.org/issues/17186
Notes:
Merged: https://github.com/ruby/ruby/pull/3602
|