JuliaAlgebra / StaticPolynomials.jl

Fast evaluation of multivariate polynomials
https://juliaalgebra.github.io/StaticPolynomials.jl/latest/
Other
16 stars 4 forks source link

Make SExponents opaque isbits type #12

Closed saschatimme closed 6 years ago

saschatimme commented 6 years ago

Currently SExponents has a NTuple{N, Int} in its type parameter. I noticed that for large tuples this can trip up inference. This PR changes SExponents to be a isbits type of the form

struct SExponents{N}
    exponents::NTuple{N, UInt8}
    size::Tuple{Int,Int} # nvars, nterms
end

and Polynomial now takes an instance of SExponents instead of a type.

codecov-io commented 6 years ago

Codecov Report

Merging #12 into master will decrease coverage by 0.16%. The diff coverage is 73.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   88.13%   87.96%   -0.17%     
==========================================
  Files          10       10              
  Lines         455      457       +2     
==========================================
+ Hits          401      402       +1     
- Misses         54       55       +1
Impacted Files Coverage Δ
src/system.jl 51.94% <0%> (ø) :arrow_up:
src/show.jl 91.25% <100%> (ø) :arrow_up:
src/evaluation.jl 92.59% <100%> (ø) :arrow_up:
src/polynomial.jl 96.55% <100%> (ø) :arrow_up:
src/sexponents.jl 71.42% <63.63%> (-3.58%) :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 3498aa7...683a0ea. Read the comment docs.