Hi all,
During a performance pass on some code that makes heavy use of sympy symbol objects, I noticed expr.as_coeff_exponent() showing up in my profiles. I'm using this function to multiplicatively factor a Symbol object representing physical dimensions. Given a symbol x/y, I'm looking for a way to compute that this is equivalent to x**1 * y**-1
Here x and y are members of a "base" set of Symbols I know all other symbols must be composed through various multiplicative factors.
I'm curious if there is a more performant way to implement this function, given that I know I'm passing it instances of `Mul`.
Thanks for your help!
-Nathan