[#102393] [Ruby master Feature#17608] Compact and sum in one step — sawadatsuyoshi@...

Issue #17608 has been reported by sawa (Tsuyoshi Sawada).

13 messages 2021/02/04

[#102438] [Ruby master Bug#17619] if false foo=42; end creates a foo local variable set to nil — pkmuldoon@...

Issue #17619 has been reported by pkmuldoon (Phil Muldoon).

10 messages 2021/02/10

[#102631] [Ruby master Feature#17660] Expose information about which basic methods have been redefined — tenderlove@...

Issue #17660 has been reported by tenderlovemaking (Aaron Patterson).

9 messages 2021/02/27

[#102639] [Ruby master Misc#17662] The herdoc pattern used in tests does not syntax highlight correctly in many editors — eregontp@...

Issue #17662 has been reported by Eregon (Benoit Daloze).

13 messages 2021/02/27

[#102652] [Ruby master Bug#17664] Behavior of sockets changed in Ruby 3.0 to non-blocking — ciconia@...

Issue #17664 has been reported by ciconia (Sharon Rosner).

23 messages 2021/02/28

[ruby-core:102529] [Ruby master Feature#17632] Improve performance some Numeric methods

From: gamelinks007@...
Date: 2021-02-16 11:03:31 UTC
List: ruby-core #102529
Issue #17632 has been reported by S_H_ (Shun Hiraoka).

----------------------------------------
Feature #17632: Improve performance some Numeric methods
https://bugs.ruby-lang.org/issues/17632

* Author: S_H_ (Shun Hiraoka)
* Status: Open
* Priority: Normal
----------------------------------------
Improve performance some `Nuemric` methods(write in Ruby)

benchmark:
```yml
prelude: |
  int = 42
  flo = 4.2
benchmark:
  real?: |
    int.real?
  integer?: |
    flo.integer?
  finite?: |
    int.finite?
  infinite?: |
    int.infinite?
loop_count: 20000000

```

result:
```bash
sh@DESKTOP-L0NI312:~/rubydev/build$ make benchmark/numeric_methods.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby
generating vm_call_iseq_optimized.inc
vm_call_iseq_optimized.inc unchanged
compare-ruby: ruby 3.1.0dev (2021-02-15T09:29:35Z master 37b90bcdc1) [x86_64-linux]
built-ruby: ruby 3.1.0dev (2021-02-15T13:18:32Z improve_numeric_me.. 349c5721ad) [x86_64-linux]
last_commit=Improve Numeric methods
# Iteration per second (i/s)

|           |compare-ruby|built-ruby|
|:----------|-----------:|---------:|
|real?      |     90.157M|  106.604M|
|           |           -|     1.18x|
|integer?   |     93.559M|  105.397M|
|           |           -|     1.13x|
|finite?    |     90.229M|  104.325M|
|           |           -|     1.16x|
|infinite?  |     89.233M|  113.647M|
|           |           -|     1.27x|

```

`COMPARE_RUBY` is `ruby 3.1.0dev (2021-02-15T09:29:35Z master 37b90bcdc1) [x86_64-linux]`. BENCH_RUBY is ahead of `ruby 3.1.0dev (2021-02-15T09:29:35Z master 37b90bcdc1) [x86_64-linux]`.

pull request:
https://github.com/ruby/ruby/pull/4190



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next