benbjohnson / immutable

Immutable collections for Go
MIT License
713 stars 32 forks source link

Add MapBuilder #5

Closed benbjohnson closed 5 years ago

benbjohnson commented 5 years ago

This commit provides a MapBuilder for efficiently combining multiple Map mutations.

Closes #3

BenchmarkBuiltinMap_Set-4           10000000           210 ns/op          70 B/op          0 allocs/op
BenchmarkBuiltinMap_Delete-4        50000000            21.1 ns/op         0 B/op          0 allocs/op
BenchmarkMap_Set-4                   1000000          2227 ns/op        2192 B/op          9 allocs/op
BenchmarkMap_Delete-4                1000000          3771 ns/op        2537 B/op          8 allocs/op
BenchmarkMap_Iterator/Forward-4     100000000           19.5 ns/op
BenchmarkMapBuilder_Set-4            5000000           308 ns/op         130 B/op          4 allocs/op
BenchmarkMapBuilder_Delete-4        10000000           157 ns/op          16 B/op          2 allocs/op
codecov[bot] commented 5 years ago

Codecov Report

Merging #5 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #5   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         887    966   +79     
=====================================
+ Hits          887    966   +79
Impacted Files Coverage Δ
immutable.go 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dd9ebb8...f615b9c. Read the comment docs.