diff options
author | Sverker Eriksson <[email protected]> | 2015-04-08 17:49:12 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-04-08 17:49:12 +0200 |
commit | d6ce7b7c14be17c2184878b0bae3f2715bb45358 (patch) | |
tree | 8ef93e0fef28ed9449838f616617e9014736ee28 /erts/emulator/beam/utils.c | |
parent | fca1348be883e25fcdeca0e9879036b6cd87ac23 (diff) | |
parent | 8f7246a7c02a50561c171f3d91170a2af96eddbf (diff) | |
download | otp-d6ce7b7c14be17c2184878b0bae3f2715bb45358.tar.gz otp-d6ce7b7c14be17c2184878b0bae3f2715bb45358.tar.bz2 otp-d6ce7b7c14be17c2184878b0bae3f2715bb45358.zip |
Merge branch 'sverk/refactor-encode-size/OTP-12585'
* sverk/refactor-encode-size/OTP-12585:
erts: Optimize insert and delete for big maps
erts: Optimize == and /= for unequal big maps
erts: Refactor encode_size_struct_int
Conflicts:
erts/emulator/beam/erl_map.c
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 2dd81e3ca3..bf6d9fff50 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -2911,7 +2911,7 @@ static int cmp_atoms(Eterm a, Eterm b) */ Sint cmp(Eterm a, Eterm b) { - return erts_cmp(a, b, 0); + return erts_cmp(a, b, 0, 0); } #endif @@ -2920,9 +2920,10 @@ Sint cmp(Eterm a, Eterm b) * exact = 0 -> arith-based compare */ #if HALFWORD_HEAP -Sint erts_cmp_rel_opt(Eterm a, Eterm* a_base, Eterm b, Eterm* b_base, int exact) +Sint erts_cmp_rel_opt(Eterm a, Eterm* a_base, Eterm b, Eterm* b_base, + int exact, int eq_only) #else -Sint erts_cmp(Eterm a, Eterm b, int exact) +Sint erts_cmp(Eterm a, Eterm b, int exact, int eq_only) #endif { #define PSTACK_TYPE struct erts_cmp_hashmap_state @@ -3742,7 +3743,7 @@ pop_next: return 0; not_equal: - if (!PSTACK_IS_EMPTY(hmap_stack)) { + if (!PSTACK_IS_EMPTY(hmap_stack) && !eq_only) { WSTACK_ROLLBACK(stack, PSTACK_TOP(hmap_stack)->wstack_rollback); goto pop_next; } |