On Sunday, February 15, 2026 at 2:22:32 AM UTC+1 [email protected] wrote:
I think this is because WebAssembly-built sympy uses pyodide, which is compiled to wasm directly, so it runs almost natively in your CPU. However, SageMath-in-Browser runs code in the CPU emulated by v86. I think in order to achieve the same performance as WebAssembly-built sympy, SageMath must be compiled directly to wasm using tools like emscripten <https://emscripten.org/index.html>. But that is far more challenging than the current SageMath-in-Browser approach. CPython can be compiled to wasm by emscripten, therefore you get an acceptable perfomance penalty. For example inverting a 50x50 matrix with integer coefficients in -99..99 takes about 3 seconds on my laptop with sympy live, vs about 1.3 second (native python3 interpreter) vs 0.01s (Giac/Xcas compiled to wasm) vs 0.004s (sage native) or 0.0012s (Giac/Xcas native). But sympy remains Python interpreted code and does not include advanced maths algorithms, so it will be slow except for small inputs. -- You received this message because you are subscribed to the Google Groups "sage-devel" 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/sage-devel/8641af26-cc31-44c4-97d4-dd74e3edd77an%40googlegroups.com.
