2020-06-27 20:07:47 +03:00
|
|
|
type: lib/benchmark_driver/runner/mjit
|
|
|
|
prelude: |
|
|
|
|
def mjit_abs(int) int.abs end
|
|
|
|
def mjit_bit_length(int) int.bit_length end
|
2020-12-23 09:23:45 +03:00
|
|
|
def mjit_comp(int) ~int end
|
2020-06-27 20:07:47 +03:00
|
|
|
def mjit_even?(int) int.even? end
|
|
|
|
def mjit_integer?(int) int.integer? end
|
|
|
|
def mjit_magnitude(int) int.magnitude end
|
|
|
|
def mjit_odd?(int) int.odd? end
|
|
|
|
def mjit_ord(int) int.ord end
|
2021-06-05 07:57:21 +03:00
|
|
|
def mjit_size(int) int.size end
|
2020-06-27 20:07:47 +03:00
|
|
|
def mjit_to_i(int) int.to_i end
|
|
|
|
def mjit_to_int(int) int.to_int end
|
2020-12-23 09:23:45 +03:00
|
|
|
def mjit_uminus(int) -int end
|
2020-06-27 20:07:47 +03:00
|
|
|
def mjit_zero?(int) int.zero? end
|
|
|
|
|
|
|
|
benchmark:
|
|
|
|
- mjit_abs(-1)
|
|
|
|
- mjit_bit_length(100)
|
2020-12-23 09:23:45 +03:00
|
|
|
- mjit_comp(1)
|
2020-06-27 20:07:47 +03:00
|
|
|
- mjit_even?(2)
|
|
|
|
- mjit_integer?(0)
|
|
|
|
- mjit_magnitude(-1)
|
|
|
|
- mjit_odd?(1)
|
|
|
|
- mjit_ord(1)
|
2021-06-05 07:57:21 +03:00
|
|
|
- mjit_size(1)
|
2020-06-27 20:07:47 +03:00
|
|
|
- mjit_to_i(1)
|
|
|
|
- mjit_to_int(1)
|
2020-12-23 09:23:45 +03:00
|
|
|
- mjit_uminus(1)
|
2020-06-27 20:07:47 +03:00
|
|
|
- mjit_zero?(0)
|
|
|
|
|
|
|
|
loop_count: 40000000
|