1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/bm_time_subsec.rb
mrkn 8561baf340 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
2017-04-14 05:19:12 +00:00

2 lines
40 B
Ruby

t = Time.now
4000000.times { t.subsec }