Order-of-magnitude slowdown in FIAT

Issue #5 new
Andrew McRae created an issue

Hello all,

We at Firedrake recently incorporated the changes between 5500635 and ec68699 into our fork of FIAT (i.e. all of Nico/Aslak's recent changes)

After running our test-suite through cProfile, the time spent in FIAT's polynomial_set init or 'below' jumped from 1.28% to 18.21%, accompanied by a 15-20% increase in the total test time. Nearly all the time is spent in calls to numpy_lambdify and calls to form_derivative, both in expansions.py.

Any idea what's happened?

Comments (7)

  1. Andrew McRae reporter

    Hi Marie,

    I have no reason to think this has been fixed. I can try 'benchmarking' again tomorrow. Our test suite has changed over time so it won't be like-for-like, but it should still be obvious whether it's O(1%) or O(10%).

  2. Andrew McRae reporter

    Yep, still present. There's something crazily expensive about the numpy_lambdify, it seems.

  3. Andrew McRae reporter

    Actually that's slightly unfair, basically all that time is spent inside sympy's lambdify, it seems. And there must be a lot of "stringifying" of arrays going on, because 85% of that time is spent in "printer:231:doprint".

  4. Log in to comment