aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/maps.erl
AgeCommit message (Collapse)Author
2016-02-09Improved maps:with/2 and maps:without/2 algorithmBen Wilson
The current implementation is roughly O(N*M) where N is the number of items to be removed, and M is the number of items in the map. This does not include the cost of `maps:from_list` or `maps:to_list`. This leads to pretty horrifying execution times on large maps regardless of how many or few keys are to be removed. The new implementation is O(N) where N is the number of items to be removed. For each N there's the cost of removing a key from a map, and but in practice that turns out to be a vast improvement for all map sizes I tested The new maps:take/2 implementation similarly builds a list of keys and values by iterating only the list of desired keys, and then hands it off to maps:from_list. This turned out to be faster than N maps:put calls.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-19stdlib: Use lc to implement maps:map/2Björn-Egil Dahlberg
2015-05-18stdlib: Add maps:filter/2Björn-Egil Dahlberg
2015-04-13stdlib: Correct maps module exceptions upon errorsBjörn-Egil Dahlberg
Bad input to maps module function will now yield exceptions: * {badmap,NotMap} or, * badarg
2014-08-26Merge branch 'kittee/maps_only' into maintMarcus Arendt
* kittee/maps_only: maps:only/2 -> maps:with/2 add maps:only/2
2014-07-10maps:only/2 -> maps:with/2Igor Savchuk
2014-07-07add maps:only/2Igor Savchuk
2014-07-01documentation: maps:values() returns list of keyslharc
probably a copy&paste error from maps:keys()
2014-04-12Add default value for maps:getSergey Abramyan
2014-03-28Take out no_native compiler attributeKostis Sagonas
2014-03-06stdlib: Fix maps:from_list/1 spec.Björn-Egil Dahlberg
2014-01-31Allow making the system with --enable-native-libsKostis Sagonas
The HiPE compiler crashes when trying to compile these files because it does not currently support maps. So, add a -compile(no_native) attribute to these files to allow the system to be made even when configured with --enable-native-libs. This is a temporary fix and will be removed when the HiPE compiler gets proper support for maps.
2014-01-29stdlib: Make maps:fold/3 order-independentBjörn-Egil Dahlberg
This means replacing maps:foldl/3 and maps:foldr/3 with maps:fold/3.
2014-01-28stdlib: Strengthen Map module with guardsBjörn-Egil Dahlberg
This commit requires Map enabled bootstrap compiler.
2014-01-28stdlib: Remove bogus map() typeBjörn-Egil Dahlberg
2014-01-28erts,stdlib: Change map module name to mapsBjörn-Egil Dahlberg
Name conforms to EEP.