willow-ahrens / Finch.jl

Sparse tensors in Julia and more! Datastructure-driven array programing language.
http://willowahrens.io/Finch.jl/
MIT License
159 stars 15 forks source link

Remove conditionals in sparsePoint, SparseBand, SparseInterval. #604

Open willow-ahrens opened 3 months ago

willow-ahrens commented 3 months ago

All of these include a check for whether or not the column HAS a point/band/interval in it, and perhaps the additional logic there is slowing things down.

It's okay to modify these levels to ALWAYS store the feature they describe. (i.e. not just at most one point in a column, but exactly one point in a column). This should simplify the logic in these levels quite a bit.