Hi Isuru, The Rust backend has a C API for communication with Python. However, it expects the whole model as a JSON string, which may not be the most convenient form for SymEngine. I think we need to design a better API that is useful to SymEngine.
Thanks, Shahriar On Saturday, April 12, 2025 at 2:47:40 PM UTC-4 [email protected] wrote: > Hi Oscar, > > Yes, we can add symjit as another backend if it offers a C/C++ API. > We also have a pure C/C++ backend, just replace `LLVMDouble` by > `LambdaDouble`. > > Isuru > > On Sat, Apr 12, 2025 at 11:08 AM Oscar Benjamin <[email protected]> > wrote: > >> On Sat, 12 Apr 2025 at 16:32, Isuru Fernando <[email protected]> wrote: >> > >> > SymEngine is a bit slower than protosym due to using memoryviews, but >> > we can add an interface to avoid those. >> >> I'm sure it can be made faster. To be clear to anyone reading this >> both SymEngine and protosym are using LLVM for this. I could have also >> demonstrated SymPy's own llvm printing module as well. >> >> It could be possible for SymPy, SymEngine etc to use symjit instead of >> LLVM. I see potential advantages here given that symjit is a very >> light-weight install (1MB or more like 200KB without the Rust binary) >> and could be a pure Python package that is easily installed. I can >> imagine lots of libraries wanting to use this. Despite the name >> llvmlite takes up 128MB here and is much harder to build. >> >> My main point though is that it would be better if symjit can be used >> starting from something other than a SymPy expression because just >> creating a SymPy expression is slow and also SymPy is a beefy >> dependency, slow to import etc, compared to symjit which is small and >> lean. >> >> Isuru, would you consider using symjit in SymEngine? >> >> -- >> Oscar >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" 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/sympy/CAHVvXxQ1uLhQE584kUjPMYrwXU1xehLs6roHVMCYovGj%3DNkVjQ%40mail.gmail.com >> . >> > -- You received this message because you are subscribed to the Google Groups "sympy" 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/sympy/6bf7f489-79c2-4899-8f6b-26556c289a55n%40googlegroups.com.
