baggepinnen / ControlSystemIdentification.jl

System Identification toolbox, compatible with ControlSystems.jl
https://baggepinnen.github.io/ControlSystemIdentification.jl/dev
MIT License
132 stars 13 forks source link

typestability and compile-time improvements #89

Closed baggepinnen closed 2 years ago

baggepinnen commented 2 years ago

some simple type-stability improvements takes

julia> @time subspaceid(d, 2);
 13.317923 seconds (48.73 M allocations: 2.806 GiB, 8.91% gc time, 99.96% compilation time)

to

 9.236199 seconds (27.19 M allocations: 1.325 GiB, 12.12% gc time, 99.98% compilation time)
  julia> @time tfest(d);
  7.411997 seconds (25.10 M allocations: 1.631 GiB, 8.98% gc time, 99.96% compilation time) # before
  3.793959 seconds (14.25 M allocations: 944.387 MiB, 8.01% gc time, 99.93% compilation time) # after
codecov[bot] commented 2 years ago

Codecov Report

Merging #89 (0e85812) into master (4614ed9) will decrease coverage by 0.14%. The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   83.79%   83.64%   -0.15%     
==========================================
  Files          12       12              
  Lines        2005     2006       +1     
==========================================
- Hits         1680     1678       -2     
- Misses        325      328       +3     
Flag Coverage Δ
unittests 83.64% <87.50%> (-0.15%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/utils.jl 63.26% <0.00%> (-7.33%) :arrow_down:
src/types.jl 70.86% <66.66%> (ø)
src/subspace2.jl 88.37% <80.00%> (+0.03%) :arrow_up:
src/arx.jl 86.93% <95.45%> (+0.18%) :arrow_up:
src/ControlSystemIdentification.jl 76.56% <100.00%> (ø)
src/frd.jl 85.34% <100.00%> (ø)
src/frequency_weights.jl 40.62% <100.00%> (-8.03%) :arrow_down:
src/plotting.jl 92.70% <100.00%> (+0.06%) :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 4614ed9...0e85812. Read the comment docs.