`sum(fs.Variable() for i in range(n))` is slow for large `n`. So is `sum(fs.Variable() * parameter[i] for i in range(n))`. It should be simple to create another operator or two, called e.g. `Sum` and `Dot`, to allow for faster handling of such expressions.
sum(fs.Variable() for i in range(n))is slow for largen.So is
sum(fs.Variable() * parameter[i] for i in range(n)).It should be simple to create another operator or two, called e.g.
SumandDot, to allow for faster handling of such expressions.