Age | Commit message (Collapse) | Author |
---|
| ``` $ make benchmark ITEM=nilclass COMPARE_RUBY="/opt/rubies/ruby-master/bin/ruby" /opt/rubies/3.4.2/bin/ruby --disable=gems -rrubygems -I../benchmark/lib ../benchmark/benchmark-driver/exe/benchmark-driver \ --executables="compare-ruby::/opt/rubies/ruby-master/bin/ruby -I.ext/common --disable-gem" \ --executables="built-ruby::./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems --disable-gem" \ --output=markdown --output-compare -v $(find ../benchmark -maxdepth 1 -name 'nilclass' -o -name '*nilclass*.yml' -o -name '*nilclass*.rb' | sort) compare-ruby: ruby 3.5.0dev (2025-06-02T13:52:25Z master cbd49ecbbe) +PRISM [arm64-darwin24] built-ruby: ruby 3.5.0dev (2025-06-02T22:47:21Z hm-ruby-nilclass 3e7f1f0466) +PRISM [arm64-darwin24] | |compare-ruby|built-ruby| |:------------|-----------:|---------:| |rationalize | 24.056M| 53.908M| | | -| 2.24x| |to_c | 23.652M| 82.781M| | | -| 3.50x| |to_i | 89.526M| 84.388M| | | 1.06x| -| |to_f | 84.746M| 96.899M| | | -| 1.14x| |to_r | 25.107M| 83.472M| | | -| 3.32x| |splat | 42.772M| 42.717M| | | 1.00x| -| ``` This makes them much faster |
| Notes: Merged: https://.com/ruby/ruby/pull/12496 |
| ... instead, just calculate the value unless it is too big. Also, this change raises an ArgumentError if it is expected to exceed 16 GB in a 64-bit environment. (It is possible to calculate it straightforward, but it would likely be out-of-memory, so I didn't think it would make sense.) [Feature #20811] Notes: Merged: https://.com/ruby/ruby/pull/12033 |
| ``` C:\vcpkg\installed\x64-windows\include\gmp.h(2237): warning C4146: unary minus operator applied to unsigned type, result still unsigned ``` |
| Previously it would bypass the `FL_ABLE` check, but since shapes introduction, it started having a different behavior than `OBJ_FREEZE`, as it would onyl set the `FL_FREEZE` flag, but not update the shape. I have no indication of this causing a bug yet, but it seems like a trap waiting to happen. |
| assert does not print the bug report, only the file and line number of the assertion that failed. RUBY_ASSERT prints the full bug report, which makes it much easier to debug. |
| NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec Notes: Merged: https://.com/ruby/ruby/pull/7393 |
| Notes: Merged-By: peterzhu2118 <[email protected]> |
| |
| Notes: Merged: https://.com/ruby/ruby/pull/6721 |
| * Improve some Integer and Float methods * Using alias and Remove unnecessary code * Remove commentout code Notes: Merged-By: k0kubun <[email protected]> |
| [Misc #18891] Notes: Merged: https://.com/ruby/ruby/pull/6094 |
| |
| |
| |
| * Adding links to literals and Kernel Notes: Merged-By: BurdetteLamar <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/4805 |
| |
| Notes: Merged: https://.com/ruby/ruby/pull/4474 |
| Notes: Merged: https://.com/ruby/ruby/pull/4783 |
| * Move f_boolcast definination * Remove f_boolcast macro defination * to Notes: Merged: https://.com/ruby/ruby/pull/4748 Merged-By: nobu <[email protected]> |
| 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://.com/ruby/ruby/pull/4682 |
| Notes: Merged: https://.com/ruby/ruby/pull/4684 |
| Rational literals are those integers suffixed with `r`. They tend to be a part of more complex expressions like `123/456r`, but in theory they can live alone. When such "bare" rational literals are passed to case-when branch, we have to take care of them. Fixes [Bug #17854] Notes: Merged: https://.com/ruby/ruby/pull/4469 |
| |
| |
| |
| sequences (#3870) [Bug #17218] [ruby-core:100312] Notes: Merged-By: mrkn <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/3691 |
| Kernel.Rational() (#3702) This makes `Rational(BigDecimal(1), 60) == Rational(1, 60)`. [Bug #16518] Notes: Merged-By: mrkn <[email protected]> |
| [Bug #12485] Notes: Merged-By: mrkn <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/3589 |
| RARRAY_AREF has been a macro for reasons. We might not be able to change that for public APIs, but why not relax the situation internally to make it an inline function. Notes: Merged: https://.com/ruby/ruby/pull/3419 |
| When rationalizing negative values. |
| |
| |
| |
| I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://.com/ruby/ruby/pull/3247 |
| I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://.com/ruby/ruby/pull/3247 |
| To fix build failures. Notes: Merged: https://.com/ruby/ruby/pull/3079 |
| This shall fix compile errors. Notes: Merged: https://.com/ruby/ruby/pull/3079 |
| NDEBUG can be defined via a command-line argument. Should take care of such situations. |
| Split ruby.h Notes: Merged-By: shyouhei <[email protected]> |
| |
| |
| |
| |
| |
| Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies). Notes: Merged: https://.com/ruby/ruby/pull/2711 |
| This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://.com/ruby/ruby/pull/2476 |