aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-01-02 11:39:07 +0900
committerGitHub <noreply@github.com>2021-01-01 18:39:07 -0800
commitdaec5f9edcfbf98b10a4bfc1aa501c9ac2c64841 (patch)
tree584ce612193fa7b4cfd78e4013ba4de4e66a59ca /benchmark
parentef6ab776d55f2775957b107a3a0d8c45ece119b8 (diff)
downloadruby-daec5f9edcfbf98b10a4bfc1aa501c9ac2c64841.tar.gz
Improve performance some Float methods [Feature #17498] (#4018)
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/float_methods.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/benchmark/float_methods.yml b/benchmark/float_methods.yml
new file mode 100644
index 0000000000..56ea41effc
--- /dev/null
+++ b/benchmark/float_methods.yml
@@ -0,0 +1,14 @@
+prelude: |
+ flo = 4.2
+benchmark:
+ to_f: |
+ flo.to_f
+ abs: |
+ flo.abs
+ magnitude: |
+ flo.magnitude
+ -@: |
+ -flo
+ zero?: |
+ flo.zero?
+loop_count: 20000000