diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-14 05:19:12 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-14 05:19:12 +0000 |
commit | 3865a97b7bb3ac74de910aaa21559b6b0c0baefd (patch) | |
tree | a431a5078fd5460fed9f01ab59b2c96f1b132c87 /benchmark/bm_time_subsec.rb | |
parent | 02149402698b81c98e11ed9b89895193e847940d (diff) | |
download | ruby-3865a97b7bb3ac74de910aaa21559b6b0c0baefd.tar.gz |
Improve performance of type conversion using to_r
* object.c: Add to_r in conv_method_tbl.
* defs/id.def: add to_r.
* benchmark/bm_int_quo.rb: added.
* benchmark/bm_time_subsec.rb: added.
[Bug #13426]
[ruby-core:80665]
[Fix GH-1582]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/bm_time_subsec.rb')
-rw-r--r-- | benchmark/bm_time_subsec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmark/bm_time_subsec.rb b/benchmark/bm_time_subsec.rb new file mode 100644 index 0000000000..505021c701 --- /dev/null +++ b/benchmark/bm_time_subsec.rb @@ -0,0 +1,2 @@ +t = Time.now +4000000.times { t.subsec } |