From b736ea63bd4ce4e2fc81dfa73938b39fa70f659c Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 30 Mar 2020 22:27:01 -0700 Subject: Optimize exivar access on JIT-ed getivar JIT support of dd723771c11. $ benchmark-driver -v --rbenv 'before;before --jit;after --jit' benchmark/mjit_exivar.yml --repeat-count=4 before: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) [x86_64-linux] before --jit: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-03-31T05:57:24Z mjit-exivar 128625baec) +JIT [x86_64-linux] Calculating ------------------------------------- before before --jit after --jit mjit_exivar 57.944M 53.579M 54.471M i/s - 200.000M times in 3.451588s 3.732772s 3.671687s Comparison: mjit_exivar before: 57944345.1 i/s after --jit: 54470876.7 i/s - 1.06x slower before --jit: 53579483.4 i/s - 1.08x slower --- mjit.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mjit.h') diff --git a/mjit.h b/mjit.h index c504112488..462d2998de 100644 --- a/mjit.h +++ b/mjit.h @@ -62,8 +62,10 @@ struct mjit_options { // State of optimization switches struct rb_mjit_compile_info { - // Disable getinstancevariable/setinstancevariable optimizations based on inline cache + // Disable getinstancevariable/setinstancevariable optimizations based on inline cache (T_OBJECT) bool disable_ivar_cache; + // Disable getinstancevariable/setinstancevariable optimizations based on inline cache (FL_EXIVAR) + bool disable_exivar_cache; // Disable send/opt_send_without_block optimizations based on inline cache bool disable_send_cache; // Disable method inlining -- cgit v1.2.3