summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 01:55:00 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 01:55:00 +0000
commit33c8171c65ac0f66d1c096561e253f6f068fc85c (patch)
tree6632eedc091bc87ee8c58a8a972426a7dff48ee2 /insns.def
parentbddc28b2aeb6ca84c9eb2cdd59ccc9b76098e429 (diff)
downloadruby-33c8171c65ac0f66d1c096561e253f6f068fc85c.tar.gz
make opt_case_dispatch leaf
This instruction can be written without rb_funcall. It not only boosts performance of case statements, but also makes room of future JIT improvements. Because opt_case_dispatch is about optimization this should not be a bad thing to have. ---- trunk: ruby 2.6.0dev (2018-09-05 trunk 64634) [x86_64-darwin15] ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15] last_commit=make opt_case_dispatch leaf Calculating ------------------------------------- trunk ours vm2_case_lit 1.366 2.012 i/s - 1.000 times in 0.731839s 0.497008s Comparison: vm2_case_lit ours: 2.0 i/s trunk: 1.4 i/s - 1.47x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def4
1 files changed, 0 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index cf9d980277..ced6054cce 100644
--- a/insns.def
+++ b/insns.def
@@ -1020,10 +1020,6 @@ opt_case_dispatch
(CDHASH hash, OFFSET else_offset)
(..., VALUE key)
()
-/* Case dispatch involves hash lookup, which inevitably compares
- * several objects each other. The same discussion to
- * opt_newarray_max also goes here. */
-// attr bool leaf = false; /* has rb_any_cmp() */
// attr rb_snum_t sp_inc = -1;
{
OFFSET dst = vm_case_dispatch(hash, else_offset, key);