Chapter 10 of the FEniCS book notes that with variants of UserExpression
the calls to eval
needed for integration (done in DOLFIN, i.e. C++) will be done in Python, i.e. involve callbacks which are the source of inefficiency. This is in contrast to Expression
which gets compiled to C++ and hence there are no callbacks. Note that Expression
constructor is not the only way to get C++ compiled expressions, as shown in @kamensky example here.