I noticed browsing the Giac docs there is a better way to implement free_symbols (fewer allocations, more performant)
"""
free_symbols(ex::GiacExpr) -> GiacExpr
Return the free symbols in a symbolic expression
"""
function free_symbols(ex::GiacExpr)::GiacExpr
return Commands.lname(ex)
end
This returns a GiacExpr that can be converted into a vector or list, so is a change from returning a Set of GiacExpr objects,
If you think this a worthwhile change, I can submit a PR. Otherwise, perhaps adding a link to lname in the docstring would be helpful if someone was concerned with performance.
I noticed browsing the Giac docs there is a better way to implement free_symbols (fewer allocations, more performant)
This returns a
GiacExprthat can be converted into a vector or list, so is a change from returning aSetofGiacExprobjects,If you think this a worthwhile change, I can submit a PR. Otherwise, perhaps adding a link to
lnamein the docstring would be helpful if someone was concerned with performance.