[前][次][番号順一覧][スレッド一覧]

ruby-changes:65216

From: Nobuyoshi <ko1@a...>
Date: Wed, 10 Feb 2021 19:42:35 +0900 (JST)
Subject: [ruby-changes:65216] ad2c7f8a1e (master): Simple benchmark of Float#to_s

https://git.ruby-lang.org/ruby.git/commit/?id=ad2c7f8a1e

From ad2c7f8a1ea82d5b1913b466fcac63b77cb07569 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 10 Feb 2021 19:42:00 +0900
Subject: Simple benchmark of Float#to_s

---
 benchmark/float_to_s.yml | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 benchmark/float_to_s.yml

diff --git a/benchmark/float_to_s.yml b/benchmark/float_to_s.yml
new file mode 100644
index 0000000..0abae5c
--- /dev/null
+++ b/benchmark/float_to_s.yml
@@ -0,0 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/float_to_s.yml#L1
+prelude: |
+  floats = [*0.0.step(1.0, 0.0001)]
+
+benchmark:
+  to_s: floats.each {|f| f.to_s}
+
+loop_count: 1000
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]