mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
benchmark/complex_float_*.yml: New benchmarks
Add new benchmark scripts for binary operations of Complex with float components. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
11ba186c47
commit
8d473272db
6 changed files with 42 additions and 0 deletions
7
benchmark/complex_float_add.yml
Normal file
7
benchmark/complex_float_add.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_add: c = a + b
|
||||
loop_count: 1000000
|
7
benchmark/complex_float_div.yml
Normal file
7
benchmark/complex_float_div.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_div: c = a / b
|
||||
loop_count: 1000000
|
7
benchmark/complex_float_mul.yml
Normal file
7
benchmark/complex_float_mul.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_mul: c = a * b
|
||||
loop_count: 1000000
|
7
benchmark/complex_float_new.yml
Normal file
7
benchmark/complex_float_new.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_new: c = Complex(a, b)
|
||||
loop_count: 1000000
|
7
benchmark/complex_float_power.yml
Normal file
7
benchmark/complex_float_power.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_power: c = a ** b
|
||||
loop_count: 1000000
|
7
benchmark/complex_float_sub.yml
Normal file
7
benchmark/complex_float_sub.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
prelude: |
|
||||
max, min = 1000.0, -1000.0
|
||||
a = Complex(rand(max)+min, rand(max)+min)
|
||||
b = Complex(rand(max)+min, rand(max)+min)
|
||||
benchmark:
|
||||
complex_float_sub: c = a - b
|
||||
loop_count: 1000000
|
Loading…
Reference in a new issue