sympy/sympy — pull request #8506 by asmeurer (2014-11-23 04:23:04+00:00)
Title: Don't use as_real_imag in _should_evalf

It is too slow. Added a test that takes forever to run without this fix.

Fixes #8469.

This is still slow because match is slow, because it uses signsimp. Removing it leads to a couple of test failures, which I think are acceptable given the performance regression they cause.