summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorUrabe, Shyouhei <shyouhei@ruby-lang.org>2018-09-19 10:41:56 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-09-02 13:56:40 +0900
commit8ad7fafcddece2096b748178df9a3318cb1ba3ae (patch)
tree3628acfffcef258cec171918899deb36262521fb /vm_insnhelper.c
parentff462bc6c3d88bab9df4c8d17b420f21223984c2 (diff)
opt_regexpmatch1 is actually making things slower.
---- trunk: ruby 2.6.0dev (2018-09-18 trunk 64767) [x86_64-darwin15] ours: ruby 2.6.0dev (2018-09-18 opt_regexpmatch 64775) [x86_64-darwin15] last_commit=opt_regexpmatch1 is actually making things slower. Calculating ------------------------------------- trunk ours Optcarrot Lan_Master.nes 33.877 35.282 fps Comparison: Optcarrot Lan_Master.nes ours: 35.3 fps trunk: 33.9 fps - 1.04x slower
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/1959
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 185178797c..81493a4fa5 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4372,6 +4372,10 @@ vm_opt_regexpmatch2(VALUE recv, VALUE obj)
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
return rb_reg_match(obj, recv);
}
+ else if (CLASS_OF(recv) == rb_cRegexp &&
+ BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
+ return rb_reg_match(recv, obj);
+ }
else {
return Qundef;
}