zenika-open-source / immutadot

immutadot is a JavaScript library to deal with nested immutable structures.
https://immutadot.zenika.com
MIT License
178 stars 5 forks source link

:zap: Improve perf on core functions #315

Closed nlepage closed 5 years ago

nlepage commented 5 years ago

Issue : fix #310

codecov-io commented 5 years ago

Codecov Report

Merging #315 into dev will decrease coverage by 2.32%. The diff coverage is 65.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #315      +/-   ##
==========================================
- Coverage   99.15%   96.83%   -2.33%     
==========================================
  Files         107      107              
  Lines         357      379      +22     
==========================================
+ Hits          354      367      +13     
- Misses          3       12       +9
Impacted Files Coverage Δ
packages/immutadot/src/lang/add.js 100% <100%> (ø) :arrow_up:
packages/immutadot/src/core/set.js 100% <100%> (ø) :arrow_up:
packages/immutadot/src/core/get.js 100% <100%> (ø) :arrow_up:
packages/immutadot/src/core/apply.js 62.5% <59.09%> (-37.5%) :arrow_down:

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 8801223...71b9626. Read the comment docs.

nlepage commented 5 years ago

Even better, I wrote an apply that actually has good perfs, provided you specify when the updater has a fixed arity.