The commits should be fairly self-contained. The changes are
Use tuple([...]) over tuple(generator), since it's a bit faster and some of these get called a lot.
Return original expressions if nothing changed in geometric_algebra.mappers.
Add an early exit in DerivativeBinder.map_product if it didn't find any nablas.
The only change that had a visible effect (i.e > 1s) was the second one. The main culprit was the hashing and equality comparisons for the various caches and that helped hit the self is other case more often and avoid the expensive checks.
The commits should be fairly self-contained. The changes are
tuple([...])
overtuple(generator)
, since it's a bit faster and some of these get called a lot.geometric_algebra.mappers
.DerivativeBinder.map_product
if it didn't find any nablas.The only change that had a visible effect (i.e > 1s) was the second one. The main culprit was the hashing and equality comparisons for the various caches and that helped hit the
self is other
case more often and avoid the expensive checks.