question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use SymEngine to improve performance of symbolic tensor calculus

See original GitHub issue

🐞 Problem

I am opening this issue for tracking progress and discussion.

Some functions for symbolic tensor calculus are slow, for example the kerr_christoffels in the example page takes a noticeable time to complete.

SymEngine can be used to replace SymPy to improve the performance. In support of this, I did a simple benchmark of original christoffels function in utils and replacing functions in SymPy with SymEngine. I see a 4x performance boost which includes the overhead introduced by type conversion between SymPy and SymEngine.

This issue is related to #70 . Consider switching to SymEngine when refactoring and extending the codebase.

📋 Steps to solve the problem

  • Comment below about what you’ve started working on.
  • Add, commit, push your changes
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for a review in comments section of pull request
  • Celebrate your contribution to this project 🎉

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Marlin-Nacommented, Apr 30, 2019

@shreyasbapat The plot you want : )

benchmarkplot

1reaction
shreyasbapatcommented, Apr 30, 2019

And about this,

BTW, even sympy people are floating projects to switch to symengine backend. https://github.com/sympy/sympy/wiki/GSoC-2018-Ideas#improve-sympy-integration

If they are doing it, why should we even care? 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use SymEngine to improve performance of symbolic tensor calculus ...
I am opening this issue for tracking progress and discussion. Some functions for symbolic tensor calculus are slow, for example the kerr_christoffels in...
Read more >
Symbolic Computation and Code Generation for Robotics - arXiv
Abstract—We present SymForce, a library for fast symbolic computation, code generation, and nonlinear optimization for robotics applications ...
Read more >
SymbolicNim, symbolic algebra in Nim
It seems BinaryBuilder has support for symengine so if I can get it to work with Nimterop there's a chance I won't have...
Read more >
SymPy: symbolic computing in Python - PeerJ
mpz type for x, and GMPY methods for rounding-related operations, improving performance. Most mpmath and SymPy functions use the same naming ...
Read more >
Metaticket - SageManifolds Code Improvement Discussion
The reason is that the main bottleneck is symbolic calculus on the tensor field ... If one were to attempt to integrate/use SymEngine?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found