From: marcandre-ruby-core@marc-andre.ca
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50940] [Ruby master Feature#17054] Implemented some NilClass method in Ruby code is faster
Date: Mon, 27 Jul 2020 18:12:48 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-86756.20200727181247.35524@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-17054.20200727165421.35524@ruby-lang.org>
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/
prev parent reply other threads:[~2020-07-27 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 16:54 [ruby-dev:50937] " 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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-86756.20200727181247.35524@ruby-lang.org \
--to=marcandre-ruby-core@marc-andre.ca \
--cc=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).