diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-10 19:42:00 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-10 19:42:00 +0900 |
commit | ad2c7f8a1ea82d5b1913b466fcac63b77cb07569 (patch) | |
tree | a07667f70cacc309aaad888f1af27cc222fa691f /benchmark | |
parent | 281dfacb5db335c60b3f0ec58bb077690b100a35 (diff) |
Simple benchmark of Float#to_s
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/float_to_s.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmark/float_to_s.yml b/benchmark/float_to_s.yml new file mode 100644 index 0000000000..0abae5cdb8 --- /dev/null +++ b/benchmark/float_to_s.yml @@ -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 |