1
0
Fork 0
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:
Nobuyoshi Nakada 2021-02-10 19:42:00 +09:00
parent 281dfacb5d
commit ad2c7f8a1e
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

7
benchmark/float_to_s.yml Normal file
View 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