From 40ced763b4f97dd3bc3abfd4cb16580f7cf8e898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 29 May 2020 17:42:23 +0900 Subject: vm_insnhelper.c: merge opt_eq_func / opt_eql_func These two function were almost identical, except in case of T_STRING/T_FLOAT. Why not merge them into one, and let the difference be handled in normal method calls (slowpath). This does not improve runtime performance for me, but at least reduces for instance rb_eql_opt from 653 bytes to 86 bytes on my machine, according to nm(1). --- insns.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 58349b0ccc..ba95655f9f 100644 --- a/insns.def +++ b/insns.def @@ -1168,7 +1168,7 @@ opt_eq (VALUE recv, VALUE obj) (VALUE val) { - val = opt_eq_func(GET_ISEQ(), recv, obj, cd); + val = opt_equality(GET_ISEQ(), recv, obj, cd); if (val == Qundef) { CALL_SIMPLE_METHOD(); -- cgit v1.2.3