aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-02-21 11:39:14 +0100
committerGitHub <[email protected]>2018-02-21 11:39:14 +0100
commit1540a0758b8d60af7b3832158015bd8cf64016af (patch)
tree665c0519adb7385f4eab09942ee0700ff591595b /erts/emulator
parent2ed6b2c7c28746385054e9b83bb845d35d49e4fc (diff)
parentad29b4d489b5a3f1139d3307a67c544b93995e26 (diff)
downloadotp-1540a0758b8d60af7b3832158015bd8cf64016af.tar.gz
otp-1540a0758b8d60af7b3832158015bd8cf64016af.tar.bz2
otp-1540a0758b8d60af7b3832158015bd8cf64016af.zip
Merge PR-1708 from philipstears OTP-14934
Optimize non-strict equality check of binaries differing in size
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index fe9f1c7606..4bf60619ba 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -3152,6 +3152,9 @@ tailrecur_ne:
int cmp;
byte* a_ptr;
byte* b_ptr;
+ if (eq_only && a_size != b_size) {
+ RETURN_NEQ(a_size - b_size);
+ }
ERTS_GET_BINARY_BYTES(a, a_ptr, a_bitoffs, a_bitsize);
ERTS_GET_BINARY_BYTES(b, b_ptr, b_bitoffs, b_bitsize);
if ((a_bitsize | b_bitsize | a_bitoffs | b_bitoffs) == 0) {