-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Currently VNV's num_inactive field is a Dict{Int,Int} (or before #1098 an OrderedDict{Int,Int}). As @penelopeysm noted in #1098 (comment), that's equivalent to a SparseVector, which might be more performant. We could also afford to store a dense Vector if that's faster (it's no longer than some of the other vectors).
I also suspect that num_inactive is almost always zero for all variables. It might thus be worth making it Union{Nothing, Dict{Int,Int}} or Union{Nothing, (Sparse)Vector{Int}}, where the nothing would mark no variable as having inactive entries, and these checks could be compiled away. num_inactive is checked on every call to getindex_internal(vnv, Colon) and update_internal!!, so this might make a difference.