@@ -222,8 +222,8 @@ protected ArgumentClinicProvider getArgumentClinic() {
222
222
@ GenerateNodeFactory
223
223
abstract static class EqNode extends PythonBinaryBuiltinNode {
224
224
225
- @ Specialization (guards = "canCompareBytes (left, right)" )
226
- static boolean eqFastPath (PArray left , PArray right ) {
225
+ @ Specialization (guards = "shouldCompareBytes (left, right)" )
226
+ static boolean eqBytes (PArray left , PArray right ) {
227
227
if (left .getLength () != right .getLength ()) {
228
228
return false ;
229
229
}
@@ -236,8 +236,8 @@ static boolean eqFastPath(PArray left, PArray right) {
236
236
return true ;
237
237
}
238
238
239
- @ Specialization (replaces = "eqFastPath " )
240
- static boolean eq (PArray left , PArray right ,
239
+ @ Specialization (guards = "!shouldCompareBytes(left, right) " )
240
+ static boolean eqItems (PArray left , PArray right ,
241
241
@ CachedLibrary (limit = "4" ) PythonObjectLibrary lib ,
242
242
@ Cached ArrayNodes .GetValueNode getLeft ,
243
243
@ Cached ArrayNodes .GetValueNode getRight ) {
@@ -258,7 +258,7 @@ static Object eq(PArray left, Object right) {
258
258
return PNotImplemented .NOT_IMPLEMENTED ;
259
259
}
260
260
261
- protected static boolean canCompareBytes (PArray left , PArray right ) {
261
+ protected static boolean shouldCompareBytes (PArray left , PArray right ) {
262
262
return left .getFormat () == right .getFormat () && left .getFormat () != BufferFormat .DOUBLE && left .getFormat () != BufferFormat .FLOAT ;
263
263
}
264
264
}
0 commit comments