Merge pull request #6191 from leviongit/sym-eql

Speed up symbol equality comparison
This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-04-04 07:35:54 +09:00
committed by GitHub
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -2660,6 +2660,9 @@ RETRY_TRY_BLOCK:
if (mrb_obj_eq(mrb, regs[a], regs[a+1])) {
SET_TRUE_VALUE(regs[a]);
}
else if (mrb_symbol_p(regs[a])) {
SET_FALSE_VALUE(regs[a]);
}
else {
OP_CMP(==,eq);
}