Open saschatimme opened 6 years ago
Comparing the variables by name will be slower since we need to do string comparison (even comparison of symbol is handled with string comparison if you look into Julia source code). In TypedPolynomials, this is handled at compile time since the name is a type parameter so it does not matter too much but in DynamicPolynomials, it might slow down a lot of operation to compare variables with names. If you convince me otherwise with a benchmark then I am open to change the behavior :)
I really like DynamicPolynomials, but the one thing which I noticed a lot of people stumble on is
Could you @blegat maybe explain the reasoning behind creating always a new variable and not relying on the variable name alone? Is it because of the ordering of the variables? How breaking would it be to change things to a lexicographic ordering of the variables?