Dear Luca, 

Just reporting back:
My function evaluations now are 1.5x-2.0x slower with symegine compared to 
functionparser which could be 6x-12x slower 
than a hardcoded Function<dim> (depending on the case etc). That's alot 
better 
Thanks again. 

Abbas

On Saturday, November 22, 2025 at 8:39:19 AM UTC+1 Abbas Ballout wrote:

> Dear Luca, 
>
> I ll give this a try. (there goes my weekend ) 
> Thanks for the hint. 
> Abbas
>
> On Thursday, November 20, 2025 at 2:37:26 PM UTC+1 [email protected] 
> wrote:
>
>> You could use symbolic functions (based on symengine) and optimize the 
>> function with LLVM (you have to have symengine installed with LLVM 
>> optimizer). 
>>
>> Luca
>>
>> Il giorno 20 nov 2025, alle ore 11:45, Abbas Ballout <
>> [email protected]> ha scritto:
>>
>> Hi all, 
>>
>>
>>
>> I want to have the flexibility of* Functions::Parsed<dim>*, i.e., 
>> allowing the user to pass a string expression for a function at runtime, 
>> but with the performance of *Functions<dim>.*
>>
>> I understand that Functions::Parsed is slow because a) muParser overhead 
>> and string parsing b) neither I nor the compiler can make optimisations at 
>> compile time.
>> I have complicated time dependent vector valued expressions that are 
>> slowing the overall assembly at boundaries by a factor of 2x. Even for 
>> simple expressions, error calculations between an exact Functions::Parsed 
>> and a numerical solution can be 6x slower than if I were to use 
>> a Functions<dim> but that doesn't take a big chunk of the code runtime 
>> anyway so it's okay.  
>>
>> Wondering if there is something else in the library or if there is a 
>> workaround to this? Was thinking about caching the Functions::Parsed values 
>> in a table maybe? 
>>
>> thanks and best, 
>> Abbas
>>
>> -- 
>> The deal.II project is located at http://www.dealii.org/
>> For mailing list/forum options, see 
>> https://groups.google.com/d/forum/dealii?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "deal.II User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/dealii/b39f8227-dd5b-4b13-b366-188988dfe983n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/b39f8227-dd5b-4b13-b366-188988dfe983n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/cfa1f172-25f1-4bbd-b511-d0bb539c05fdn%40googlegroups.com.

Reply via email to