ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50937] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster
@ 2020-07-27 16:54 gamelinks007
  2020-07-27 17:01 ` [ruby-dev:50938] " gamelinks007
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gamelinks007 @ 2020-07-27 16:54 UTC (permalink / raw)
  To: ruby-dev

Issue #17054 has been reported by S_H_ (Shun Hiraoka).

----------------------------------------
Feature #17054: Implemented some NilClass method in Ruby code is faster
https://bugs.ruby-lang.org/issues/17054

* Author: S_H_ (Shun Hiraoka)
* Status: Open
* Priority: Normal
----------------------------------------
Looking at these pull requests, I think, "Is it faster to implement some NilClass method by Ruby code?".

https://github.com/ruby/ruby/pull/3264

https://github.com/ruby/ruby/pull/3277

So I tried implementing NilClass by Ruby.

benchmark:

```bash
sh@MyComputer:~/rubydev/build$ make benchmark/benchmark.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
generating vm_call_iseq_optimized.inc
vm_call_iseq_optimized.inc unchanged
# Iteration per second (i/s)

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|to_i  |     36.563M|   60.801M|
|      |           -|     1.66x|
|to_f  |     66.225M|   70.205M|
|      |           -|     1.06x|
```

`COMPARE_RUBY` is `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`. `BENCH_RUBY` is ahead of `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`









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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:50938] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster
  2020-07-27 16:54 [ruby-dev:50937] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster gamelinks007
@ 2020-07-27 17:01 ` gamelinks007
  2020-07-27 17:59 ` [ruby-dev:50939] " marcandre-ruby-core
  2020-07-27 18:12 ` [ruby-dev:50940] " marcandre-ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: gamelinks007 @ 2020-07-27 17:01 UTC (permalink / raw)
  To: ruby-dev

Issue #17054 has been updated by S_H_ (Shun Hiraoka).


Patch was created.

https://github.com/ruby/ruby/pull/3366

----------------------------------------
Feature #17054: Implemented some NilClass method in Ruby code is faster
https://bugs.ruby-lang.org/issues/17054#change-86753

* Author: S_H_ (Shun Hiraoka)
* Status: Open
* Priority: Normal
----------------------------------------
Looking at these pull requests, I think, "Is it faster to implement some NilClass method by Ruby code?".

https://github.com/ruby/ruby/pull/3264

https://github.com/ruby/ruby/pull/3277

So I tried implementing NilClass by Ruby.

benchmark:

```bash
sh@MyComputer:~/rubydev/build$ make benchmark/benchmark.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
generating vm_call_iseq_optimized.inc
vm_call_iseq_optimized.inc unchanged
# Iteration per second (i/s)

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|to_i  |     36.563M|   60.801M|
|      |           -|     1.66x|
|to_f  |     66.225M|   70.205M|
|      |           -|     1.06x|
```

`COMPARE_RUBY` is `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`. `BENCH_RUBY` is ahead of `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`









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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:50939] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster
  2020-07-27 16:54 [ruby-dev:50937] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster gamelinks007
  2020-07-27 17:01 ` [ruby-dev:50938] " gamelinks007
@ 2020-07-27 17:59 ` marcandre-ruby-core
  2020-07-27 18:12 ` [ruby-dev:50940] " marcandre-ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: marcandre-ruby-core @ 2020-07-27 17:59 UTC (permalink / raw)
  To: ruby-dev

Issue #17054 has been updated by marcandre (Marc-Andre Lafortune).

Status changed from Open to Rejected

The results are in "instructions per second". Higher is faster.

In general, you can't make builtin C code faster by implementing it in Ruby, unless there's some mistake in the C code.

----------------------------------------
Feature #17054: Implemented some NilClass method in Ruby code is faster
https://bugs.ruby-lang.org/issues/17054#change-86755

* Author: S_H_ (Shun Hiraoka)
* Status: Rejected
* Priority: Normal
----------------------------------------
Looking at these pull requests, I think, "Is it faster to implement some NilClass method by Ruby code?".

https://github.com/ruby/ruby/pull/3264

https://github.com/ruby/ruby/pull/3277

So I tried implementing NilClass by Ruby.

benchmark:

```bash
sh@MyComputer:~/rubydev/build$ make benchmark/benchmark.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
generating vm_call_iseq_optimized.inc
vm_call_iseq_optimized.inc unchanged
# Iteration per second (i/s)

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|to_i  |     36.563M|   60.801M|
|      |           -|     1.66x|
|to_f  |     66.225M|   70.205M|
|      |           -|     1.06x|
```

`COMPARE_RUBY` is `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`. `BENCH_RUBY` is ahead of `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`









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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:50940] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster
  2020-07-27 16:54 [ruby-dev:50937] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster gamelinks007
  2020-07-27 17:01 ` [ruby-dev:50938] " gamelinks007
  2020-07-27 17:59 ` [ruby-dev:50939] " marcandre-ruby-core
@ 2020-07-27 18:12 ` marcandre-ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: marcandre-ruby-core @ 2020-07-27 18:12 UTC (permalink / raw)
  To: ruby-dev

Issue #17054 has been updated by marcandre (Marc-Andre Lafortune).

Status changed from Rejected to Open

Sorry, looks like I misread.

----------------------------------------
Feature #17054: Implemented some NilClass method in Ruby code is faster
https://bugs.ruby-lang.org/issues/17054#change-86756

* Author: S_H_ (Shun Hiraoka)
* Status: Open
* Priority: Normal
----------------------------------------
Looking at these pull requests, I think, "Is it faster to implement some NilClass method by Ruby code?".

https://github.com/ruby/ruby/pull/3264

https://github.com/ruby/ruby/pull/3277

So I tried implementing NilClass by Ruby.

benchmark:

```bash
sh@MyComputer:~/rubydev/build$ make benchmark/benchmark.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
generating vm_call_iseq_optimized.inc
vm_call_iseq_optimized.inc unchanged
# Iteration per second (i/s)

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|to_i  |     36.563M|   60.801M|
|      |           -|     1.66x|
|to_f  |     66.225M|   70.205M|
|      |           -|     1.06x|
```

`COMPARE_RUBY` is `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`. `BENCH_RUBY` is ahead of `ruby 2.8.0dev (2020-07-27T15:18:40Z master c5ae79d7e9) [x86_64-linux]`









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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-27 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 16:54 [ruby-dev:50937] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster gamelinks007
2020-07-27 17:01 ` [ruby-dev:50938] " gamelinks007
2020-07-27 17:59 ` [ruby-dev:50939] " marcandre-ruby-core
2020-07-27 18:12 ` [ruby-dev:50940] " marcandre-ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).