diff options
author | John Högberg <[email protected]> | 2019-02-25 14:49:49 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-02-25 20:13:24 +0100 |
commit | cd7fa515675adf2551887b6e5ad6ba8d08814413 (patch) | |
tree | 476e6cfd021205d28da5d059ca6cf73fc4cfebb4 /lib/compiler/src | |
parent | 42f0f3fcbce009e56270fdccdb6f0a85e3b4b368 (diff) | |
download | otp-cd7fa515675adf2551887b6e5ad6ba8d08814413.tar.gz otp-cd7fa515675adf2551887b6e5ad6ba8d08814413.tar.bz2 otp-cd7fa515675adf2551887b6e5ad6ba8d08814413.zip |
cerl_sets: Use maps:filter/2 in filter/2
This should be slightly more efficient than converting to/from
lists for large sets.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/cerl_sets.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/cerl_sets.erl b/lib/compiler/src/cerl_sets.erl index 0361186713..f489baf238 100644 --- a/lib/compiler/src/cerl_sets.erl +++ b/lib/compiler/src/cerl_sets.erl @@ -204,4 +204,4 @@ fold(F, Init, D) -> Set2 :: set(Element). filter(F, D) -> - maps:from_list(lists:filter(fun({K,_}) -> F(K) end, maps:to_list(D))). + maps:filter(fun(K,_) -> F(K) end, D). |