-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern match the map key for more efficiency #3635
Conversation
Doing maps:find creates the ok-tuple, which means garbage, and also then needs to match on it. It it more efficient to pattern-match on the map key.
Codecov Report
@@ Coverage Diff @@
## master #3635 +/- ##
==========================================
- Coverage 81.03% 81.03% -0.01%
==========================================
Files 427 427
Lines 31962 31962
==========================================
- Hits 25901 25899 -2
- Misses 6061 6063 +2
Continue to review full report at Codecov.
|
small_tests_24 / small_tests / 9527a06 small_tests_23 / small_tests / 9527a06 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 9527a06 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 9527a06 dynamic_domains_mysql_redis_24 / mysql_redis / 9527a06 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 9527a06 ldap_mnesia_23 / ldap_mnesia / 9527a06 ldap_mnesia_24 / ldap_mnesia / 9527a06 internal_mnesia_24 / internal_mnesia / 9527a06 pgsql_mnesia_23 / pgsql_mnesia / 9527a06 pgsql_mnesia_24 / pgsql_mnesia / 9527a06 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 9527a06 mysql_redis_24 / mysql_redis / 9527a06 mssql_mnesia_24 / odbc_mssql_mnesia / 9527a06 riak_mnesia_24 / riak_mnesia / 9527a06 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Doing maps:find creates the ok-tuple, which means garbage, and also then
needs to match on it. It it more efficient to pattern-match on the map key.