mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Simple benchmark of Float#to_s
This commit is contained in:
parent
281dfacb5d
commit
ad2c7f8a1e
1 changed files with 7 additions and 0 deletions
7
benchmark/float_to_s.yml
Normal file
7
benchmark/float_to_s.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
prelude: |
|
||||||
|
floats = [*0.0.step(1.0, 0.0001)]
|
||||||
|
|
||||||
|
benchmark:
|
||||||
|
to_s: floats.each {|f| f.to_s}
|
||||||
|
|
||||||
|
loop_count: 1000
|
Loading…
Add table
Add a link
Reference in a new issue