JKRT / OMFrontend.jl

Experimental implementation of NF. That is a Modelica frontend in 100% Julia
Other
2 stars 3 forks source link

Fixed performance regression. Improved performance of Lookup #54

Closed JKRT closed 2 years ago

JKRT commented 2 years ago

This PR introduces more efficient precompilation. It also fixes the performance regression resulting from Julia 1.7 where the compiler went into an infinite loop when inferring types. It also improves the performance of doing lookups

codecov-commenter commented 2 years ago

Codecov Report

Merging #54 (0f88f75) into master (e45d452) will increase coverage by 12.55%. The diff coverage is 50.67%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #54       +/-   ##
===========================================
+ Coverage    2.77%   15.32%   +12.55%     
===========================================
  Files         164      166        +2     
  Lines       61104    59128     -1976     
===========================================
+ Hits         1693     9061     +7368     
+ Misses      59411    50067     -9344     
Impacted Files Coverage Δ
src/NewFrontend/BindingExpression.jl 19.27% <0.00%> (+19.27%) :arrow_up:
src/NewFrontend/NFBuiltin.jl 0.00% <ø> (ø)
src/NewFrontend/NFCeval.jl 6.84% <0.00%> (+6.84%) :arrow_up:
src/NewFrontend/NFClass.jl 35.68% <0.00%> (+35.68%) :arrow_up:
src/NewFrontend/NFComponent.jl 35.19% <0.00%> (+35.19%) :arrow_up:
src/NewFrontend/NFEvalFunction.jl 0.00% <0.00%> (ø)
src/NewFrontend/NFExpandableConnectors.jl 8.53% <0.00%> (+8.13%) :arrow_up:
src/NewFrontend/NFFlatten.jl 35.78% <0.00%> (+35.67%) :arrow_up:
src/NewFrontend/NFFunction.jl 27.69% <0.00%> (+27.69%) :arrow_up:
src/NewFrontend/NFOperatorOverloading.jl 0.00% <0.00%> (ø)
... and 81 more

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 e45d452...0f88f75. Read the comment docs.

JKRT commented 2 years ago

@adrpo I fixed this now should be possible to add more MSL tests. One change here is that I added more precompilation during compiletime so that a user need to spend less time waiting when he or she uses the package.

The initial precompilation will take more time than before, this is also true for importing the package. However, using the package to compile models after it has been used once will be much faster. Overall, this PR improves the performance of the frontend by about 2X:)