Or perhaps a pure-Polys implementation could be done which will likely be faster than conversion to expr and then dealing with it there.