> Alternatively, one could try to see if 
https://github.com/container2wasm/container2wasm works to get a 64bit-based 
version.

Unfortunately, container2wasm will not work for image with size greater 
than 2GB (like SageMath). See this discussion (
https://github.com/container2wasm/container2wasm/issues/230). Also 64-bit 
wasm can be even slower than 32-bit.

> By the way, WebAssembly-built sympy, https://www.sympy.org/en/shell.html, 
seems to be considerably faster.

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.
On Sunday, February 15, 2026 at 2:12:16 AM UTC+8 [email protected] wrote:

> Alternatively, one could try to see if 
> https://github.com/container2wasm/container2wasm works to get a 
> 64bit-based version.
>
> On Saturday, February 14, 2026 at 7:09:54 PM UTC+1 [email protected] wrote:
>
>> This is cool! Thanks for your work.
>>
>> Just as shot in the dark: perhaps the 32-bit version of archlinux allows 
>> to install all up-to-date sage dependencies. If that's the case, you could 
>> just build sage using `pip install .`, which is then non-editable.
>>
>> @others: what do you think about adding this to the website as "Try 
>> SageMath", so that potential users can see if they like sage enough to 
>> install it on their PC?
>>
>> On Saturday, February 14, 2026 at 3:28:10 PM UTC+1 parisse wrote:
>>
>>> Thanks for the confirmation.  
>>> It’s a fascinating technical milestone, but if we are looking to 
>>> resources conservation,  this is clearly not the right direction...
>>>
>>> On Saturday, February 14, 2026 at 1:36:39 PM UTC+1 [email protected] 
>>> wrote:
>>>
>>>> SageMath-in-Browser is about 2 orders of magnitude slower than native 
>>>> sage code.
>>>> I ran the following bench mark:
>>>> 'from sage.misc.benchmark import *'
>>>> '_ = benchmark()'
>>>>
>>>> Output of SageMath-in-Browser:
>>>> [image: benchmark.png]
>>>> Output of native sage:
>>>> [image: bench_native.png]
>>>> On Saturday, February 14, 2026 at 4:55:39 PM UTC+8 Georgi Guninski 
>>>> wrote:
>>>>
>>>>> > I don't know the expected performance penalty. 
>>>>>
>>>>> To measure the time, create `file.sage` with fast code. 
>>>>> In bash run: time sage file.sage # for native sage 
>>>>> and: time emulated_sage file.sage #for JS sage 
>>>>>
>>>>> To benchmark inside sage, one possibility is: 
>>>>> sage: timeit("code") 
>>>>>
>>>>

-- 
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/e413f5b6-8896-40df-af94-0d08cca4df4cn%40googlegroups.com.

Reply via email to