Test of expand and substitute in Symbolics.jl, SymEngine.jl and Mathematica

My computer is Mac Pro M1, 2020.
General Comments: for expand, SymEngine is nearly as good as Mathematica, Symbolics‘s “expand” function still needs to be greatly improved. substitute are similar for the three CAS in performance.

  1. expand,
    Symbolics (code+time)
 f=(x+big(2)y)^6000|>expand;  # 64.2s 
 f=(x+big(2)y)^100000|>expand;  # looks infinity 

SymEngine

 f=(x+2y)^6000|>expand; #0.5s
 f=(x+2y)^100000|>expand;  # 10.6s

Mathematica takes 0.01s and 3.1s respectively.

  1. substitute
    Symbolics takes 0.9s
 substitute(f,Dict(x=>big(1),y=>big(2))); 

SymEngine takes 0.4s

subs(f,Dict(x=>1,y=>2));

Mathematica takes 0.06s

Yes, it does need to be improved. Unityper and BasicSymbolic by YingboMa · Pull Request #432 · JuliaSymbolics/SymbolicUtils.jl · GitHub should help a lot but is not released right now to Symbolics.

great news! Looking forward to that.